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
1 registered members (TipmyPip), 18,574 guests, and 6 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
Memory leaks, continue #275804
07/02/09 12:41
07/02/09 12:41
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
when i diselect entity, i call function
Code:
void HlSpriteHideModel(ENTITY* ent)
{	
	if (ent.sHandSprt != NULL)
	{
		ENTITY* sprEnt = ptr_for_handle(ent.sHandSprt);
		ent_remove(sprEnt);
		ent.sHandSprt = NULL;
	}
}



if i comment this function's call, number of functions on the debug panel is 18 and it undepends from how many times i select/diselect bots

if i uncomment this function's call, number of functions increased depending on unmber of times, when i diselect entity

why this function can do that, i dont have loops there?


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Memory leaks, continue [Re: VeT] #275809
07/02/09 12:46
07/02/09 12:46
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
can you try:

Code:
void HlSpriteHideModel(ENTITY* ent)
{	
	if (ent.sHandSprt != NULL)
	{
		ENTITY* sprEnt = ptr_for_handle(ent.sHandSprt);
             ent.sHandSprt = NULL;		
             ent_remove(sprEnt);
		
	}
}



switching it around,
maybe it does not get removed (keeps in memory) before the
stored pointer in the eneity is set to null..

Re: Memory leaks, continue [Re: Damocles_] #275812
07/02/09 12:53
07/02/09 12:53
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
hmmm... swap those strings , but its still increase frown


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Memory leaks, continue [Re: VeT] #275815
07/02/09 12:59
07/02/09 12:59
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
ah, i found error
in the closest view, another function calls loop... Damocles, thanks for help smile


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Memory leaks, continue [Re: VeT] #275816
07/02/09 12:59
07/02/09 12:59
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
no problem wink

Re: Memory leaks, continue [Re: Damocles_] #275818
07/02/09 13:07
07/02/09 13:07
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
I see that a debug feature to display all currently running functions is highly desirable to find such multitasking-related errors. This will be implemented with high priority.

Re: Memory leaks, continue [Re: jcl] #275834
07/02/09 13:18
07/02/09 13:18
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline
Serious User
pegamode  Offline
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
That's great news ... that would help us very much in our current project.

Re: Memory leaks, continue [Re: pegamode] #275842
07/02/09 13:35
07/02/09 13:35
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
maybe with a "dump" function, that
saves the names and number of active functions to a log-file at a
specific time.

Re: Memory leaks, continue [Re: Damocles_] #275846
07/02/09 13:46
07/02/09 13:46
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
Quote:
I see that a debug feature to display all currently running functions is highly desirable to find such multitasking-related errors. This will be implemented with high priority.


yeahh! smile


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro

Moderated by  old_bill, Tobias 

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