Originally Posted By: jcl
removing a different panel that shares a bitmap [...]
ptr_remove just releases the memory of the panel and all its bitmaps.

Hmm what does that mean exactly when we look at the following cases:
Code:
=== CASE 1 === 
BMAP* compass_map = "compass.pcx"; 
PANEL* aircraft_pan =
{
   bmap = compass_map; // compass_map as panel background
   flags = SHOW;
}

=== CASE 2 === 
Same as in 1 but bmap pointer (globally or locally created) dynamically assigned - most likely the same?

=== CASE 3 === 
PANEL* splashscreen = { bmap = "splash.pcx"; } // creates a bmap splash_pcx

=== CASE 4 === 
PANEL* pnlDynamic = pan_create("...");
no panel background bmap
pan_setwindow(pnlDynamic, ...,BMAPPOINTER,...);



In which of those 4 cases are bitmaps being freed?


EDIT:
Originally Posted By: jcl
It's clear that when you use a local panel pointer, and something happens to that panel while the function is still running, it will crash.

I do not understand what this means, can you rephrase that sentence please? confused
In Turrican's situation the panel is created locally inside the function, not used in or "exposed" to any other function. Yet it crashes on removal. (EDIT2: Panel confirmed to be still in the C_LINK list before ptr_remove.)

Last edited by Superku; 07/05/18 14:17.

"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