Who deleted posted NetEvents after send?
by Anthony Lovell · in Torque Game Engine · 02/26/2007 (7:15 am) · 1 replies
I do not see that my dynamically newed-up NetEvents ever get deleted after they make it out the wire. What is the intended lifecycle for these?
edit: I guess I am going to try adding
void MyEvent::notifyPosted(EventConnection *) { incRef(); }
void MyEvent::notifySent(EventConnection *) { decRef(); }
are there other such overrides I should be trying (for unguaranteed events)?
I would *really* like to see TNL make use of the RefCounting on these so I can rest assured that I can wash my hands of any event I post, and rely on TNL honoring any incRef()s I might employ on processEvent(). I am making these enhancements in my own code.
tone
edit: I guess I am going to try adding
void MyEvent::notifyPosted(EventConnection *) { incRef(); }
void MyEvent::notifySent(EventConnection *) { decRef(); }
are there other such overrides I should be trying (for unguaranteed events)?
I would *really* like to see TNL make use of the RefCounting on these so I can rest assured that I can wash my hands of any event I post, and rely on TNL honoring any incRef()s I might employ on processEvent(). I am making these enhancements in my own code.
tone
Torque Owner Kirby Zhang
This is not helpful to me if I want to queue up events to fire them at my choosing. I ended up writing up a parallel events hierarchy, with NetEvent used as a transport only.