Re: [AD] al_emit_user_event

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


On 2011-02-04, Trent Gamblin <trent@xxxxxxxxxx> wrote:
> Is it ok and correct if I append something like "Passing a dynamically
> allocated (malloc, new) event to this function will result in a memory
> leak." to the documentation for this function? I was passing in
> dynamically allocated events at first and freeing them in the
> destructor which was causing crashes, presumably because Allegro does
> something with the event after the destructor is run?

Events are copied.  I think that's where you got confused?
That certainly needs to be documented.

Peter




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