Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Possible memory leax IBX & XE7


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Oct 19, 2014 4:22 PM Last Post By: Jeff Overcash (...
Hafedh TRIMECHE

Posts: 107
Registered: 12/29/06
Possible memory leax IBX & XE7  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 19, 2014 12:58 PM
FastMM reported these details:

--------------------------------2014/10/19 20:36:47--------------------------------
This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):

53 - 68 bytes: TObjectDictionary<System.string,IBX.IBDatabase.TFieldNode> x 20

Note: Memory leak detail is logged to a text file in the same folder as this application. To disable this memory leak check, undefine "EnableMemoryLeakReporting".

--------------------------------2014/10/19 20:36:47--------------------------------
A memory block has been leaked. The size is: 68

This block was allocated by thread 0x1684, and the stack trace (return addresses) at the time was:
406C9A [System.pas][System][System.@GetMem][4391]
408777 [System.pas][System][System.TObject.NewInstance][15641]
408E9E [System.pas][System][System.@ClassCreate][16951]
9F1F26 [System.Generics.Collections.pas][IBX.IBDatabase][IBX.IBDatabase.{System.Generics.Collections}TDictionary<System.string,IBX.IBDatabase.TFieldNode>.Create][1785]
9EB073 [IBX.IBDatabase.pas][IBX.IBDatabase][IBX.IBDatabase.TSchema.Add_Node][2582]
9EB8F3 [IBX.IBDatabase.pas][IBX.IBDatabase][IBX.IBDatabase.TSchema.Has_COMPUTED_BLR][2685]
9E877E [IBX.IBDatabase.pas][IBX.IBDatabase][IBX.IBDatabase.TIBDatabase.Has_COMPUTED_BLR][1504]
992A9A [IBX.IBCustomDataSet.pas][IBX.IBCustomDataSet][IBX.IBCustomDataSet.TIBCustomDataSet.InternalInitFieldDefs][3257]
990083 [IBX.IBCustomDataSet.pas][IBX.IBCustomDataSet][IBX.IBCustomDataSet.TIBCustomDataSet.InternalPrepare][1953]
A054CC [IBX.IBQuery.pas][IBX.IBQuery][IBX.IBQuery.TIBQuery.QueryChanged][217]
A05EBD [IBX.IBQuery.pas][IBX.IBQuery][IBX.IBQuery.TIBQuery.PrepareSQL][423]

The block is currently used for an object of class: TObjectDictionary<System.string,IBX.IBDatabase.TFieldNode>

The allocation number is: 59571
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: Possible memory leax IBX & XE7  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 19, 2014 4:22 PM   in response to: Hafedh TRIMECHE in response to: Hafedh TRIMECHE
Hafedh TRIMECHE wrote:
FastMM reported these details:

--------------------------------2014/10/19 20:36:47--------------------------------
This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):

53 - 68 bytes: TObjectDictionary<System.string,IBX.IBDatabase.TFieldNode> x 20

Note: Memory leak detail is logged to a text file in the same folder as this application. To disable this memory leak check, undefine "EnableMemoryLeakReporting".

--------------------------------2014/10/19 20:36:47--------------------------------
A memory block has been leaked. The size is: 68

This block was allocated by thread 0x1684, and the stack trace (return addresses) at the time was:
406C9A [System.pas][System][System.@GetMem][4391]
408777 [System.pas][System][System.TObject.NewInstance][15641]
408E9E [System.pas][System][System.@ClassCreate][16951]
9F1F26 [System.Generics.Collections.pas][IBX.IBDatabase][IBX.IBDatabase.{System.Generics.Collections}TDictionary<System.string,IBX.IBDatabase.TFieldNode>.Create][1785]
9EB073 [IBX.IBDatabase.pas][IBX.IBDatabase][IBX.IBDatabase.TSchema.Add_Node][2582]
9EB8F3 [IBX.IBDatabase.pas][IBX.IBDatabase][IBX.IBDatabase.TSchema.Has_COMPUTED_BLR][2685]
9E877E [IBX.IBDatabase.pas][IBX.IBDatabase][IBX.IBDatabase.TIBDatabase.Has_COMPUTED_BLR][1504]
992A9A [IBX.IBCustomDataSet.pas][IBX.IBCustomDataSet][IBX.IBCustomDataSet.TIBCustomDataSet.InternalInitFieldDefs][3257]
990083 [IBX.IBCustomDataSet.pas][IBX.IBCustomDataSet][IBX.IBCustomDataSet.TIBCustomDataSet.InternalPrepare][1953]
A054CC [IBX.IBQuery.pas][IBX.IBQuery][IBX.IBQuery.TIBQuery.QueryChanged][217]
A05EBD [IBX.IBQuery.pas][IBX.IBQuery][IBX.IBQuery.TIBQuery.PrepareSQL][423]

The block is currently used for an object of class: TObjectDictionary<System.string,IBX.IBDatabase.TFieldNode>

The allocation number is: 59571

Yes this is known and fixed internally. It is only really a factor if you
create and destroy a lot of TIBDatabase components during your app. for the
most part where you connect and keep the connection going for hte lifetime, it
is memory that would just be cleaned up by the OS at app close time.

The fix is to change in IBX.IBDatabase.pas line 2582 to

FFieldList := TFieldDictionary.Create([doOwnsValues]);

and 2649 to

FRelations := TRelationDictionary.Create([doOwnsValues]);

and statically link in the changed pas file.

Also there is a dedicated InterbaseExpress group here. That is a better way to
make sure IBX issues are seen or answered. I rarely read the DBX group.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted corridors of Whitehall.
(Fish)

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02