Menu

#286 Recursive method memory leak

4.0*
open
nobody
None
5
2018-08-11
2018-08-11
No

There is a memory leak when a method is called recursively and the object is deleted:

package require Itcl

itcl::class Class {

    public method m {x} {

        if {$x == 0} {
            m 1
        }
    }
}

while 1 {
    set obj [Class #auto]
    $obj m 0
    itcl::delete object $obj
}

The leak is ~3.5 KB per object. This was tested with Itcl 4.1.1 from June 18, 2018.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB