Jump to content

Post Effects stay in Memory


Recommended Posts

Ive noticed that with other things like just loading models then releasing them in older versions. i havent tried in more recent versions though. But I saw the same results in game as well as the editor - adding something raised the memory but removing them did not lower it.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

I don't see any reason it would. The code release the effect when effects are cleared. If the shader is loaded somewhere else, it won't get deleted, but otherwise there's no reason it would not. The log file will indicate when items are being deleted from memory and it should say something like "deleting shader "posteffects\FXAA,shader",,,

 

Lua games are not that great at instant memory testing. You would have to be calling collect() continuously to get a more precise reading.

 

If it's a scripted effect it is possible the script itself might not be cleaning up after itself. That would be my suispicion.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I found this bug by checking my log file after play testing Hunt For Food. The fog shader is loaded when it rains and it should delete when it stops raining but after I checked my log I noticed that it wasn't being deleted and I just had a bunch of fog shaders being loaded everytime it started raining.

 

I checked over the shaders and the fog shader is loaded through a script but the fxaa and contrast shaders are not. Which means that this happens regardless of the shader being loaded through a script.

Check out my game Rogue Snowboarding- 

https://haydenmango.itch.io/roguesnowboarding

Link to comment
Share on other sites

No, I mean that some effects are shaders and some more complex effects are actually script files. Script effects can create extra buffers and stuff and it is possible the programmer did not free something in the detach function.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Shaders cannot have that problem.

 

My guess is it's just the Lua garbage collector not collecting yet.

 

Honestly, even if it is leaking right now I wouldn't worry about it. I mean, 2 kb of memory lost each time the player changes settings isn't realistically going to hurt anything. If there is a bug it will get fixed, in the meantime it's not worth changing code over.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...