Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by jcl. 04/24/26 17:48
ZorroGPT
by TipmyPip. 04/23/26 14:23
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 3,176 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 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,094
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,094
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