Heap dump by heaptrc unit69136 memory blocks allocated : 34568850/3482457668448 memory blocks freed : 34527568/34782368688 unfreed memory blocks : 41282True heap size : 1474560True free heap : 1326080Should be : 1344288Call trace for block $0000000006A1AF50 size 43 $0000000100011282 $00000001000097F3 $000000010000A84C $000000010000D91A $000000010015F750 $000000010015E0D5 $000000010015D353 $BAADF00DBAADF00DCall trace for block $0000000006A2D9F0 size 16 $0000000100011282 $000000010000E427 $000000010015F732 $000000010015E0D5 $000000010015D353 $000000010015D670 $000000010015D397 $BAADF00DBAADF00DCall trace for block $0000000006A2D950 size 16 $0000000100011282 $000000010000E427 $000000010016027A $000000010015DF6E $000000010015D4D9 $000000010015D3D9 $000000010015D670 $BAADF00DBAADF00D
Many memory leaks not in my code
Quote$BAADF00DBAADF00DThat's called a marker..., like the more commonly known $DEADBEEF. It's just more friendly to vegetarians. (or not.., I like dead beef.)...Hmm, can anybody think of anything better to insult - slightly - within the constraints of A..F? (DEADDAD doesn't count))
Quote from: russdirks on April 18, 2017, 06:23:49 amMany memory leaks not in my codeThat is what they all say
Compile your rtl with debug and gl turned on and you should be able to get a better trace.
Recompiling right now, using the "Build Lazarus : Debug IDE" profile which I assume is how you do what you are referring to.
You most likely use some kind of composite array/list in your program. Just before you free the list make sure you also free every object(s) belonging to each item. You need some kind of Finalize(Data) where Data is a pointer. I'm I right?
QuoteRecompiling right now, using the "Build Lazarus : Debug IDE" profile which I assume is how you do what you are referring to.Ok, that didn't work. I'm still not getting line numbers in the stack traces. How exactly do I "Compile the rtl with debug and gl turned on"?
No, actually it was the GetJSON function. It converts a JSON string to an object, which you are responsible to free, but I wasn't doing that. The documentation should really say something about that, although it is kind of obvious.