nomad-software / tkd

GUI toolkit for the D programming language based on Tcl/Tk
MIT License
117 stars 16 forks source link

Fix potential for dangling pointers in Element.createCommand. #17

Closed nomad-software closed 10 years ago

nomad-software commented 10 years ago

Because the garbage collector cleans up during runtime it may free uniqueData and callback inside the CommandArgs struct when creating a new command. Check and alter the behaviour of the Element.createCommand method to not allow this.

https://github.com/nomad-software/tkd/blob/master/source/tkd/element/element.d#L172

nomad-software commented 10 years ago

Switched to allocating memory from the GC heap instead of the unmanaged heap when creating a command. https://github.com/nomad-software/tkd/commit/d77ff8603e26e7645c60b2613b996f1b21e751fc

nomad-software commented 10 years ago

Fixed in https://github.com/nomad-software/tkd/releases/tag/v1.0.4-beta