Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,758 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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