How to make sure GC allocated resources stay around when used in C functions?

Gary Willoughby via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 13 11:47:44 PDT 2014


On Tuesday, 13 May 2014 at 06:27:14 UTC, Kagamin wrote:
> Do you always bind all of them?

They are not bound automatically but may be bound later. You can 
bind to events such as mouse-enter, mouse-click, keypresses, etc. 
In fact this is how keyboard shortcuts are handled.

I've added a potential fix to remove the allocation from the 
unmanaged heap and let the GC handle it. See what you think:

https://github.com/nomad-software/tkd/commit/d77ff8603e26e7645c60b2613b996f1b21e751fc


More information about the Digitalmars-d-learn mailing list