Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » [A5] Destroying event sources

This thread is locked; no one can reply to it. rss feed Print
[A5] Destroying event sources
BitCruncher
Member #11,279
August 2009

Hey guys,

Never used A5 before; I installed it literally not over an hour ago, and I'm surprised how quickly I understood the new paradigms. I can't wait to see how it performs.

Anyway, when I create a normal event source such as with al_get_keyboard_event_source (), do I need to destroy it afterwards? I see a function for destroying user events, but not this one in particular.

Edgar Reynaldo
Member #8,592
May 2007
avatar

You never need to destroy event sources, unless you create them yourself. So if you use al_init_user_event_source, then you need to destroy it with al_destroy_user_event_source when you're done with it. And event sources automagically un-register themselves from event queues when they are destroyed, so you don't need to worry about that.

RPG Hacker
Member #12,492
January 2011
avatar

automagically

I know it was probably a typo, but I love you for creating that word! ;D

Edgar Reynaldo
Member #8,592
May 2007
avatar

RPG Hacker
Member #12,492
January 2011
avatar

In any case, this goes right into my dictionary! :)

Edgar Reynaldo
Member #8,592
May 2007
avatar

RPG Hacker
Member #12,492
January 2011
avatar

Seems like I missed some great times. Thanks for explaining!

EDIT
Even WIKI knows that word, WOW, I feel so lame right now! ;D

Go to: