help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Strategy to finding memleaks


From: Holger Hans Peter Freyther
Subject: Re: [Help-smalltalk] Strategy to finding memleaks
Date: Sat, 09 Apr 2011 10:27:58 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b2 Thunderbird/3.1.9

On 04/09/2011 10:24 AM, Paolo Bonzini wrote:
> On 04/09/2011 09:55 AM, Holger Hans Peter Freyther wrote:
>> Hi Paolo,

> 
>     x := SomeClass someInstance.
>     [o := x allOwners. o isEmpty] whileTrue: [ x := x nextInstance ].
>     (o collect: [ :each |each class]) asBag
> 


Hi,
thanks for your fast reply. I was doing this test code:


    [
    [
        top select: 'SELECT * FROM version()'.
    ] repeat
    ] ensure: [
        ObjectMemory compact.
        DBI.Statement allSubinstancesDo: [:each | each class printNl].
        DBI.ResultSet allSubinstancesDo: [:each | each class printNl].
    ].

then using CTRL+C and it appears that after GC many ResultSets are still in
the image. I am now going to use your trick to find the owners.

thanks
        holger



reply via email to

[Prev in Thread] Current Thread [Next in Thread]