kanaka / mal

mal - Make a Lisp
Other
10.03k stars 2.54k forks source link

Memory leak with Tcl implementation #278

Open DasBrain opened 7 years ago

DasBrain commented 7 years ago

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.

dubek commented 7 years ago

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.

DasBrain commented 7 years ago

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.