[AD] [alleg:bugs] #356 Memory leak for on audio event source.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Fixed, thanks. Sorry for the extremely late reply.


[bugs:#356] Memory leak for on audio event source.

Status: open
Labels: Addons
Created: Fri Apr 20, 2012 01:55 AM UTC by xpol
Last Updated: Tue Oct 09, 2012 04:21 PM UTC
Owner: nobody

In allegro 5.1.1:

src\allegro\addons\audio\audio.c (318): in function al_install_audio().
There is a call to
al_init_user_event_source((ALLEGRO_EVENT_SOURCE *)&audio_event_source);

But it does not call al_destroy_user_event_source() with audio_event_source when exit.

Call Stack:
e:\home\xpol\depends\src\allegro\src\memory.c (44): hello.exe!al_malloc_with_context + 0xC bytes
e:\home\xpol\depends\src\allegro\src\win\wxthread.c (102): hello.exe!_al_mutex_init + 0x13 bytes
e:\home\xpol\depends\src\allegro\src\evtsrc.c (43): hello.exe!_al_event_source_init + 0x9 bytes
e:\home\xpol\depends\src\allegro\src\evtsrc.c (199): hello.exe!al_init_user_event_source + 0x9 bytes
e:\home\xpol\depends\src\allegro\addons\audio\audio.c (318): hello.exe!al_install_audio + 0xA bytes

And it i do:
al_register_event_source(queue, al_get_audio_event_source());

there will case an addition leak:

Call Stack:
e:\home\xpol\depends\src\allegro\src\memory.c (44): hello.exe!al_malloc_with_context + 0xC bytes
e:\home\xpol\depends\src\allegro\src\misc\vector.c (180): hello.exe!_al_vector_alloc_back + 0x1A bytes
e:\home\xpol\depends\src\allegro\src\evtsrc.c (110): hello.exe!_al_event_source_on_registration_to_queue + 0xC bytes
e:\home\xpol\depends\src\allegro\src\events.c (154): hello.exe!al_register_event_source + 0xD bytes


Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/alleg/bugs/356/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/prefs/



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/