Menu

#356 Memory leak for on audio event source.

5.1
closed
nobody
Addons (20)
5
2013-01-30
2012-04-20
xpol
No

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

Discussion

  •  xpol

    xpol - 2012-04-20

    BTW: I tested on windows.

     
  • Peter Wang

    Peter Wang - 2013-01-30

    Fixed, thanks. Sorry for the extremely late reply.

     
  • Peter Wang

    Peter Wang - 2013-01-30
    • status: open --> closed
     

Log in to post a comment.