Possible Memory Leak?

Discussion and feedback on Construct 2

Post » Thu Jun 05, 2014 6:31 am

We're releasing our game on Steam shortly, and we've noticed a very unfortunate thing - when loading different layouts, it is increasing the memory usage in the task manager (it seems to be for any sprites/tiles that have not been loaded into the game yet). When going to a new layout, it doesn't seem to do any garbage collecting for the previously loaded objects.

I've checked my code and object count and didn't find anything. Also, of the few objects that are global, none of them are being created ever (so there is no build up of objects). I've even tried deleting most of my code and switching layouts - still nothing. We are using node-webkit.
B
43
S
12
G
1
Posts: 545
Reputation: 4,246

Post » Fri Jun 06, 2014 4:18 pm

Update - we've ruled out of sort of leak, it is confirmed to add memory every time a new texture is loaded. Once everything is loaded, the memory does not increase.
B
43
S
12
G
1
Posts: 545
Reputation: 4,246

Post » Fri Jun 06, 2014 4:32 pm

ome6a1717 wrote:Update - we've ruled out of sort of leak, it is confirmed to add memory every time a new texture is loaded. Once everything is loaded, the memory does not increase.


if you set a text object on start of layout to the value: renderer (without quotes), what does it says? canvas2d or WebGL?

If it says WebGL, I think it might be a bug
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Fri Jun 06, 2014 4:56 pm

@Aphrodite - it does say webgl- is it a node-webkit bug? or something with C2?
B
43
S
12
G
1
Posts: 545
Reputation: 4,246

Post » Fri Jun 06, 2014 5:13 pm

It sounds like normal behavior as I understand it. Node webkit and chrome have automatic memory management, if your computer's got the free ram available, it decides there's no need to remove stuff from ram (again, talking about ram here, not VRAM) and keeps it in memory in case it needs it later, which if it does it will be faster to load.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Fri Jun 06, 2014 5:18 pm

@ Arima - Thank you! We were freaking out a bit...good to know it's intended!
B
43
S
12
G
1
Posts: 545
Reputation: 4,246


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests