Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
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
0 registered members (), 677 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 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