Re: FastMM newbie questions
- From: "martin" <martin_gbg_@xxxxxxxxxxx>
- Date: 12 Jan 2007 08:08:22 -0800
Thanks for the input, guys.
I now located the TStringlist. Once I made sure it was freed
all other entries disappeared too.
So now I have a clean project, and that feels really good.
Great thing, FastMM!
/M
"Frederik Slijkerman" <idontwant@xxxxxxxx> wrote:
Yes, enable logging the memory leak info to a file, and you'll get stack
traces as well.
Best regards,
Frederik Slijkerman
"martin" <martin_gbg_@xxxxxxxxxxx> wrote in message
news:45a7a5c3@xxxxxxxxxxxxxxxxxxxxxxxxx
I understand.
The list was conciderably longer (!) and I traced many objects
down easily, but these remaining TStringLists elude me.
Can I somehow get source code references to those?
/M
"Bart van der Werf" <bluelive@xxxxxxxxx> wrote:
"Harley Pebley" <harley_pebley@xxxxxxxxxxxxx> wrote in message
news:45a78b51$1@xxxxxxxxxxxxxxxxxxxxxxxxx
2. In the leak report I get string references:
5 - 12 bytes: String x 6
13 - 20 bytes: String x 6
21 - 28 bytes: String x 3, Unknown x 11
29 - 36 bytes: String x 1, Unknown x 5
37 - 44 bytes: String x 1
45 - 60 bytes: TStringList x 8, String x 5
61 - 76 bytes: Unknown x 6
93 - 108 bytes: String x 6
What is this? Aren't strings automatically reference counted?
Yes, strings are ref counted and will go away when the references to
them go away. Remember, you're seeing all memory allocations; some of
those will be dependant on other references. In most cases with ref
counted objects, it's because something else has been allocated (e.g.
an object) but hasn't been freed.
I see above you have a string list which hasn't been freed. Any strings
it contains will still be allocated. Get rid of the string list and,
assuming its count isn't 0 and the strings it contains aren't
referenced somewhere else, you'll see the strings it contains go away
too.
As a rule of thumb, focus on the memory you've allocated first, once
that's all clean, then worry about any remaining ref counted objects.
It would probably be possible for fastmm to read the memory of the leaked
objects and see what leak is the root cause and what leaks are follow up
leaks.
greets, Bart
.
- References:
- FastMM newbie questions
- From: martin
- Re: FastMM newbie questions
- From: Harley Pebley
- Re: FastMM newbie questions
- From: Bart van der Werf
- Re: FastMM newbie questions
- From: martin
- Re: FastMM newbie questions
- From: Frederik Slijkerman
- FastMM newbie questions
- Prev by Date: Re: Fastcode StrLen B&V 1.4.0
- Next by Date: Re: Fastcode CompareStr B&V 3.0.0
- Previous by thread: Re: FastMM newbie questions
- Next by thread: Re: FastMM newbie questions
- Index(es):
Relevant Pages
|