Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
2 registered members (AbrahamR, 1 invisible), 858 guests, and 6 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
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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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 | 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