Re: [AD] memory leak in readbmp.c? |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 04 Oct 2001, Michael Bukin <M.A.Bukin@xxxxxxxxxx> wrote:
>
> I guess Allegro is compiled with constructors and
> bitmap_filetype_constructor is called before memory debugger is
> initialized and later it catches calls to free() as "freeing
> unallocated memory". Try to test for memory problems without
> using constructors.
I tested, and you're right. There's no problems then.
However, I stubbed my toe on the following code in alconfig.h.
It ignores the --disable-constructor configure option.
/* if we are using gcc, then constructors are supported */
#ifdef __GNUC__
#undef CONSTRUCTOR_FUNCTION
#undef DESTRUCTOR_FUNCTION
#define CONSTRUCTOR_FUNCTION(func) func __attribute__ ((constructor))
#define DESTRUCTOR_FUNCTION(func) func __attribute__ ((destructor))
#endif