Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////

BMAP* my_bmap = NULL;

void main()
{
	my_bmap = bmap_createblack(256,256,24);
	wait(1);
	while(1)
	{
		PANEL* pnl_test = pan_create(NULL,integer(random(9999)));
		pan_setbutton(pnl_test,0,0,150,130,my_bmap,NULL,NULL,NULL,NULL,NULL,NULL);
		ptr_remove(pnl_test);
		wait(1);
	}
}


Doesn't seem to leak any memory in the task manager.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends