Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Ayumi), 662 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ptr_remove frees childobjects too ? #408257
09/28/12 09:11
09/28/12 09:11
Joined: Dec 2003
Posts: 1,225
germany
gri Offline OP
Serious User
gri  Offline OP
Serious User

Joined: Dec 2003
Posts: 1,225
germany

he ho,

when removing a panel via ptr_remove so I have to care about its child elements before and remove them too?

Or got the memory of all the underlaying objects free'd through the nestet structur and removing the panel is enough ?


"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
Re: ptr_remove frees childobjects too ? [Re: gri] #408259
09/28/12 09:48
09/28/12 09:48
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
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
Re: ptr_remove frees childobjects too ? [Re: Superku] #408430
10/01/12 06:12
10/01/12 06:12
Joined: Dec 2003
Posts: 1,225
germany
gri Offline OP
Serious User
gri  Offline OP
Serious User

Joined: Dec 2003
Posts: 1,225
germany


hey thank you Superku for your efforts


"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1