|Re: [AD] aRts "pure virtual function call"|
[ Thread Index |
| More lists.liballeg.org/allegro-developers Archives
Selon Eric Botcazou <ebotcazou@xxxxxxxxxx>:
> Note that
> int _module_dont_unload_me_dirty_hack = 0
> is not enough to not unload the driver. You must set it to '1' somewhere.
I really had it declared as "int _module_dont_unload_me_dirty_hack = -1;" in arts.c.
But I wasn't thinking straight when I did the tests and screwed some. When
calling allegro_exit() explicitely, there is no crash at all. But that still
means the arts driver is not affected by the svgalib problem :)
> No way to detect whether _al_arts_stream is still "valid" before calling
> arts_close_stream on it?
Using the arts C API, no way that I know of. And for all we know, when arts has
been shut down, the stream has already been closed and its memory freed, so you
can't do anything with the stream pointer.
We could however deduce the validity of the stream: when remove_sound() is
called from atexit, arts_free() should have been called already, and thus the
stream should be invalid. While if remove_sound() is called explicitely before
program termination, the stream is bound to be valid. There might be something
to do this way.