mal icon indicating copy to clipboard operation
mal copied to clipboard

Memory leak with Tcl implementation

Open DasBrain opened this issue 8 years ago • 2 comments

The Tcl implementation uses TclOO objects to represent mal objects. Unlike other languages, Tcl does not have a garbage collector. Objects have to be destroyed by the programmer.

DasBrain avatar Sep 12 '17 20:09 DasBrain

I wrote the TCL impl - and indeed I mentioned this problem in the first pull request #106 ... You're welcome to try to solve it (implement GC / reference counting yourself) - it is a challenge.

dubek avatar Sep 12 '17 20:09 dubek

I will try, but I will use a dicts as objects. They are immutable, so modification of them will be hard.

Also, I don't understand why you use apply at all.

DasBrain avatar Sep 12 '17 21:09 DasBrain