Question
Displaying 1-8 of 8 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
CrazyAznGamer

Just wondering, when VERGE closes, does it automatically free any memory used by resources?

EDIT: Can you use GetInt() to get a Sound, Song, or Image?

Posted on 2005-12-20 22:40:39 (last edited on 2005-12-20 23:01:17)

Omni

I'm gonna take a wild guess. I sure hope so. Running it multiple times doesn't seem to retard my computer or anything like that.

Posted on 2005-12-20 23:01:40

Overkill

Quote:
Originally posted by CrazyAznGamer

Just wondering, when VERGE closes, does it automatically free any memory used by resources?

EDIT: Can you use GetInt() to get a Sound, Song, or Image?



Yes to both.

Are you ever loading a new image pointer to an integer without first freeing the old one? Are you using DMA at all? I think that might not free automatically.

Posted on 2005-12-21 06:28:32

Jesse

Quote:
Originally posted by CrazyAznGamer

Are you ever loading a new image pointer to an integer without first freeing the old one? Are you using DMA at all? I think that might not free automatically.



There's no automatic freeing of images in verge, in any case. When you call NewImage, it just returns an int which you can think of as the index to a big array of images. There's nothing special about that int otherwise. Same for fonts, sounds, etc. You have to explicitly free them.

Posted on 2005-12-21 14:45:00

Omni

So when I exit Verge without calling FreeImage on all my images, then that data is still stuck in memory?

Posted on 2005-12-21 16:10:52

Overkill

Quote:
Originally posted by Jesse

Quote:
Originally posted by CrazyAznGamer

Are you ever loading a new image pointer to an integer without first freeing the old one? Are you using DMA at all? I think that might not free automatically.



There's no automatic freeing of images in verge, in any case. When you call NewImage, it just returns an int which you can think of as the index to a big array of images. There's nothing special about that int otherwise. Same for fonts, sounds, etc. You have to explicitly free them.



So... when you ALT+X or click the close button on the window, it doesn't properly free the memory? I didn't know that, and I rarely felt the sideeffects of the leaked memory then either.

Posted on 2005-12-21 16:48:25

Jesse

No, no no. I meant that if you do this:

int a = NewImage(...);
a = NewImage(...);


The first one isn't freed automatically. When you quit verge, the system takes all the memory it used and recycles it.

Posted on 2005-12-21 19:37:35

Omni

Oh, that's good.

Posted on 2005-12-21 20:58:42


Displaying 1-8 of 8 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.