[AD] [ alleg-Bugs-3519687 ] Memory leak for on audio event source.

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


Bugs item #3519687, was opened at 2012-04-19 18:55
Message generated for change (Tracker Item Submitted) made by xpolife
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3519687&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Addons
Group: 5.1
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By:  xpol (xpolife)
Assigned to: Nobody/Anonymous (nobody)
Summary: Memory leak for on audio event source.

Initial Comment:
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


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3519687&group_id=5665




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