Memory leak? (solved)

Get help using Construct 2

Post » Tue Apr 22, 2014 2:37 am

https://docs.google.com/file/d/0BwP9DgG02uRoYzc1SC0teXk4Z28/edit

I'm experimenting with a rain effect using the Bullet behavior. I haven't optimized it except for destroying any off-screen instances, but it still shouldn't be behaving like this. I run it in the debugger and see that the event sheet gradually eats up CPU cycles until the browser kills the game. The number of instances remains relatively constant. Either I or the garbage collector is missing something; I'm hoping it's me. Suggestions?
Last edited by seven on Tue Apr 22, 2014 4:06 am, edited 1 time in total.
B
12
S
3
Posts: 39
Reputation: 1,001

Post » Tue Apr 22, 2014 3:04 am

Yup, I can see the same behaviour on firefox 27 here, and I don't see anything wrong with the events (granted I'm no expert).
http://www.schizokoa.com we are a small game jam group, visit us!
B
25
S
6
G
1
Posts: 51
Reputation: 1,934

Post » Tue Apr 22, 2014 4:00 am

Imagine you're at the library, and the librarian gets right in your ear and goes ssssssssssssssssssssshhhhhhhhhhhhhhhhhhhhhhhhhh, and doesn't stop
Untitled.png
You do not have the required permissions to view the files attached to this post.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Tue Apr 22, 2014 4:05 am

pffffffffffffff thank you. This is the first time I've toyed with advanced audio effects and I had no idea what I was doing. I'm surprised that was categorized under Event sheet though!

Thanks again :)
B
12
S
3
Posts: 39
Reputation: 1,001

Post » Tue Apr 22, 2014 4:15 am

I disabled the else, and the above event, and cpu did go down a bit, but to be honest it looked like garbage collection was working on my end.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Tue Apr 22, 2014 4:25 am

newt wrote:I disabled the else, and the above event, and cpu did go down a bit, but to be honest it looked like garbage collection was working on my end.

Well the CPU usage is still high (and I can bring that down mainly by making the simulation less realistic in ways that aren't noticeable) but now that I'm not adding an infinite number of audio effects the CPU usage doesn't grow over time. So that was definitely the problem, not C2's garbage collection (I am a bad workman, I love to blame my tools).
B
12
S
3
Posts: 39
Reputation: 1,001


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests

cron