Re: FastMM newbie questions




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






.



Relevant Pages

  • Re: FastMM newbie questions
    ... Can I somehow get source code references to those? ... strings are ref counted and will go away when the references to ... you're seeing all memory allocations; ... objects and see what leak is the root cause and what leaks are follow up ...
    (borland.public.delphi.language.basm)
  • Re: FastMM newbie questions
    ... strings are ref counted and will go away when the references to ... you're seeing all memory allocations; ... counted objects, it's because something else has been allocated (e.g. ...
    (borland.public.delphi.language.basm)
  • Re: FastMM newbie questions
    ... strings are ref counted and will go away when the references to ... you're seeing all memory allocations; ... counted objects, it's because something else has been allocated (e.g. ...
    (borland.public.delphi.language.basm)
  • Re: Dynamic Hash
    ... Please read the documentation on hashes before making assumptions about how they look. ... Perl provides no alternate means of handling the issue. ... The program structures were never strings per-se, in the same sense as data ... This does not get as deeply nested as a directory tree, of course, but you should be able to see how references link together ...
    (perl.beginners)
  • Re: strange linking problem
    ... I usually use C, and since strings ... > files and looks for unsatisfied references to functions and variables. ... then I don't understand how the linker does not either ... that there should be a data area of a certain size and a certain name. ...
    (comp.lang.fortran)