Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, Quad), 903 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
so now that ive mastered malloc...how do I UNmalloc? LOL #217608
07/24/08 01:02
07/24/08 01:02
Joined: Aug 2005
Posts: 238
Caermundh Offline OP
Member
Caermundh  Offline OP
Member

Joined: Aug 2005
Posts: 238
like the title says...how do I unallocate memory in lite-C that has been allocated by malloc()?

Re: so now that ive mastered malloc...how do I UNmalloc? LOL [Re: Caermundh] #217616
07/24/08 02:06
07/24/08 02:06
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
Hmm isnt there a "free" command in liteC or maybe "ptr_remove" will work


I like good 'views' because they have no 'strings' attached..
Re: so now that ive mastered malloc...how do I UNmalloc? LOL [Re: zazang] #217617
07/24/08 02:08
07/24/08 02:08
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Yeah free() does the job.


Click and join the 3dgs irc community!
Room: #3dgs
Re: so now that ive mastered malloc...how do I UNmalloc? LOL [Re: Joozey] #217620
07/24/08 02:35
07/24/08 02:35
Joined: Aug 2005
Posts: 238
Caermundh Offline OP
Member
Caermundh  Offline OP
Member

Joined: Aug 2005
Posts: 238
so i if i have something like:

obj_ptr = (object_ref*)malloc(sizeof(object_ref));

I would free up the memory allocated by:

free(obj_ptr);

like so?

Re: so now that ive mastered malloc...how do I UNmalloc? LOL [Re: Caermundh] #217621
07/24/08 02:37
07/24/08 02:37
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Yep, that should be it.


Click and join the 3dgs irc community!
Room: #3dgs
Re: so now that ive mastered malloc...how do I UNmalloc? LOL [Re: Joozey] #217622
07/24/08 02:39
07/24/08 02:39
Joined: Aug 2005
Posts: 238
Caermundh Offline OP
Member
Caermundh  Offline OP
Member

Joined: Aug 2005
Posts: 238
thanks! ;D


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