On 10/15/13, w0rp <devw0rp at gmail.com> wrote: > I couldn't think of a way to do it myself which was elegant. Perhaps you can pin the object and hook into the C++ destructor somehow?