• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Help with sprite_delete

ttower1

Member
Hello Everyone... this is my firt post

I need help, I have a project that I have dedicated more than a decade to planning, and now I don't know what to do
I am using Game Maker 8.1 because I cannot open GMS 1.4.9999 because it does not allow me to create an account.
The project works very well, I already have all the physics done, but I have a problem which are: The Resources
My game runs at 720p and my sprites and backgrounds are large with multiple frames. I was importing them via sprite_add or sprite_replace But my problem leads to deleting the sprite

The game does not delete sprites from memory, even if I use sprite_delete, and adding more increases it, making adding external resources practically useless. And I really need to depend on this option
Please, I need help with this ... Creating a game has always been my dream, and now it seems impossible due to this problem ... I hope you can help me
 

TsukaYuriko

☄️
Forum Staff
Moderator
So if Studio 1.x isn't working... how about Studio 2.x, the one that's actually being developed and supported? ;)

Memory is usually not instantly released from a process when it is no longer required. Processes tend to keep memory committed in case they may need it again in the near future, and it's only when they don't need it again for extended amounts of time that they actually fully release it.

Run the code that you think is causing a memory leak in an infinite loop. It's only a memory leak if you actually inevitably run out of memory.
 

ttower1

Member
So if Studio 1.x isn't working... how about Studio 2.x, the one that's actually being developed and supported? ;)

Memory is usually not instantly released from a process when it is no longer required. Processes tend to keep memory committed in case they may need it again in the near future, and it's only when they don't need it again for extended amounts of time that they actually fully release it.

Run the code that you think is causing a memory leak in an infinite loop. It's only a memory leak if you actually inevitably run out of memory.

My PC only has 2GB of RAM and it is Windows 7 x86 Game Maker Studio 2 does not work for me because it is for x64
I'm a bit shame say that. I would like to work on a better PC and improve my progress
I'm poor hahaha

How long does it take to remove?
I did what you told me about the loop, ... and there comes a point where it stops increasing ... that gives me hope
But ... what was already deleted with sprite_delete, still remains in processor and ram memory until it is overwritten or you need to use it?

uff, i'm really confused,
Can you guide me?
 

TsukaYuriko

☄️
Forum Staff
Moderator
There is no way to tell how long it takes for a process to release memory. In theory, it will release it whenever it wants to, but at the latest whenever it becomes needed by some other process (unless it is actively using that memory rather than just having it committed to it).

If you can't intentionally make it run out of memory, you can't accidentally make it run out of memory.
If you can't accidentally make it run out of memory, you don't have a memory leak.
If you don't have a memory leak, you don't have a problem.

If you don't have a problem, I can't guide you, and neither do I have to, because everything is working as it should. ;)
 

ttower1

Member
There is no way to tell how long it takes for a process to release memory. In theory, it will release it whenever it wants to, but at the latest whenever it becomes needed by some other process (unless it is actively using that memory rather than just having it committed to it).

If you can't intentionally make it run out of memory, you can't accidentally make it run out of memory.
If you can't accidentally make it run out of memory, you don't have a memory leak.
If you don't have a memory leak, you don't have a problem.

If you don't have a problem, I can't guide you, and neither do I have to, because everything is working as it should. ;)
ok hehehe. Thanks ... I'll add more resources to see how it works ...

Can you quote me well the sprite_delete code for Gm8?

Just to be sure

by the way, what is sprite_flush catches my attention, it is a function that is not in Game Maker 8. What is it?
 
Top