[DUG] Memory leak - can't find
Kyley Harris
kyleyharris at gmail.com
Tue Feb 5 10:54:11 NZDT 2008
What Myles said would be true if FastMM unit is not the very first unit
declared in the DPR file, which is where it should be..
It could well just be a memory leak, because you have forgotten to free the
critical section in the finalization.. Do you use indy? there is a unit
there that does not free some things in finalization unless
a compiler directive is set..
On Feb 5, 2008 9:19 AM, Myles Penlington <myles at ams.co.nz> wrote:
> Not really a leak. It's an object created in a unit initialization, but
> the unit has not been finalized by the time the leak reporting has been
> done.
>
> If you put a break point on SyncObjs][TCriticalSection.Create] you will
> find the unit responsible - prob in system/sysutils/sysinit/,
> Best to log it as a leak to be ignored.
>
> Myles.
>
> -----Original Message-----
> From: delphi-bounces at listserver.123.net.nz [mailto:
> delphi-bounces at listserver.123.net.nz] On Behalf Of Nick
> Sent: Tuesday, 5 February 2008 9:14 a.m.
> To: NZ Borland Developers Group - Delphi List
> Subject: [DUG] Memory leak - can't find
>
> Hi there,
>
> Just enabled memory reporting and got one that I just can't track down.
> I open my app, and close it and it occurs. I added the full FastMM and
> enabled 'INclude TD32 debug info' and it doesn't really help much.
>
> I have checked the onCreate of my main form and my application source -
> tired commenting it all out (except Application.CreateForm(TfMain,
> fMain); and still doesn't help.
>
> This is my log dump.
>
>
>
> --------------------------------2008/2/5
> 9:05:26--------------------------------
> A memory block has been leaked. The size is: 28
>
> Stack trace of when this block was allocated (return addresses):
> 402FB6 [System][@GetMem]
> 404577 [System][TObject.NewInstance]
> 40493E [System][@ClassCreate]
> 43D206 [SyncObjs][TCriticalSection.Create]
> 4051F7 [System][@InitResStringImports]
> 55DD3B
> 405173 [System][InitUnits]
> 4051DB [System][@StartExe]
> 407B8B [System][@InitExe]
> 55E07D
>
> The block is currently used for an object of class: TCriticalSection
>
> The allocation number is: 316
>
> Current memory dump of 256 bytes starting at pointer address 145BDC0:
> D4 D1 43 00 E8 B7 14 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 5F 82 08 FC
> 00 00 00 00 81 BE 45 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 41 01 00 00 B6 2F 40 00
> 01 56 40 00 2C 56 40 00 0A 7A 40 00 E9 CD 96 7C 44 6A 92 7C BE 6A 92 7C
> 86 D8 96 7C 18 9D 94 7C
> BE 6A 92 7C 4D 55 40 00 BB 63 40 00 45 63 40 00 20 64 40 00 40 7F 50 00
> 0B 51 40 00 BF 53 40 00
> 28 E1 55 00 4E E6 90 7C D7 6F 81 7C 18 00 00 00 00 00 00 00 39 74 FB E8
> 0C AE 56 00 80 80 80 80
> 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 C6 8B 04 17 80 80 80 80
> 00 00 00 00 19 BF 45 01
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 46 01 00 00 B6 2F 40 00
> 01 56 40 00 2C 56 40 00
> 0A 7A 40 00 E9 CD 96 7C 44 6A 92 7C BE 6A 92 7C 86 D8 96 7C 18 9D 94 7C
> BE 6A 92 7C 4D 55 40 00
> Ô Ñ C . è · . . ÿ ÿ ÿ ÿ . . . . . . . . . . . .
> . . . . _ ‚ . ü
> . . . . ¾ E . . . . . . . . . . . . . . . . .
> A . . . ¶ / @ .
> . V @ . , V @ . . z @ . é Í – | D j ' | ¾ j ' |
> † Ø – | . " |
> ¾ j ' | M U @ . » c @ . E c @ . d @ . @ P .
> . Q @ . ¿ S @ .
> ( á U . N æ | × o | . . . . . . . . 9 t û è
> . (R) V . € € € €
> € € € € € € € € € € € € € € € € Æ ‹ . . € € € €
> . . . . . ¿ E .
> . . . . . . . . . . . . . . . . F . . . ¶ / @ .
> . V @ . , V @ .
> . z @ . é Í – | D j ' | ¾ j ' | † Ø – | . " |
> ¾ j ' | M U @ .
>
> --------------------------------2008/2/5
> 9:05:26--------------------------------
> This application has leaked memory. The small block leaks are (excluding
> expected leaks registered by pointer):
>
> 21 - 28 bytes: TCriticalSection x 1
>
> 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".
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
> Subject: unsubscribe
>
>
> Attention:
> This communication is confidential and may be legally privileged. If you
> are not the intended recipient, please do not use, disclose, copy or
> distribute it, other than to return it to us with your confirmation that it
> has been deleted from your system.
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
> Subject: unsubscribe
>
--
Kyley Harris
Harris Software
+64-21-671-821
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20080205/40fd955a/attachment.html
More information about the Delphi
mailing list