bennyxqg / lua-alchemy

Automatically exported from code.google.com/p/lua-alchemy
0 stars 0 forks source link

RCValue objects not GC'd #139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start up a profiler of your choice. I'm using FlashDevelop.
2. LuaAlchemy.doString(""); Any string will work, even a blank one.
3. Watch as memory grows, along with the number of RCValue objects.

What is the expected output? What do you see instead?
I noticed this after I had left my game running for a while. It had gone from 
30mb to 350+mb memory usage. No issues before I added lua-alchemy, so I started 
up the profiler and saw 1000s of RCValue objects in memory.

What version of the product are you using? On what operating system?
lua-alchemy-v0_2a.swc
Windows XP: Flash Player 10.2.153.1

Please provide any additional information below.
I haven't played with alchemy yet, so I can't really go searching for a fix, 
otherwise I'd post it. :(

Original issue reported on code.google.com by trentste...@gmail.com on 12 Apr 2011 at 9:39

GoogleCodeExporter commented 9 years ago
Shoot, forgot to add this to the issue. Here's an image from the profiler.

Original comment by trentste...@gmail.com on 12 Apr 2011 at 9:41

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by aglad...@gmail.com on 14 Apr 2011 at 2:47

GoogleCodeExporter commented 9 years ago
Can you provide a minimal example to reproduce this behavior?

Original comment by aglad...@gmail.com on 14 Apr 2011 at 3:25

GoogleCodeExporter commented 9 years ago
Sure, here's a basic project file that'll loop doString on ENTER_FRAME. It will 
show off the leak pretty quickly. 

Original comment by trentste...@gmail.com on 14 Apr 2011 at 5:33

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks!

Original comment by aglad...@gmail.com on 14 Apr 2011 at 5:52

GoogleCodeExporter commented 9 years ago
Can you try current Git rc-0.2.1 branch HEAD? I see from commit list that some 
memory leaks were fixed there. Tell me if you need me to provide 
lua-alchemy.swc for that.

Original comment by aglad...@gmail.com on 14 Apr 2011 at 7:36

GoogleCodeExporter commented 9 years ago
Yeah I'll need a link to the swc. Getting alchemy running is over my head right 
now.

Original comment by trentste...@gmail.com on 14 Apr 2011 at 7:43

GoogleCodeExporter commented 9 years ago
No problem, attached build for rc-0.2.1 head. Tell me if it does not work for 
you, I've got a new build pipeline setup here and there is a chance that 
something is incidentally broken.

Original comment by aglad...@gmail.com on 14 Apr 2011 at 7:51

Attachments:

GoogleCodeExporter commented 9 years ago
Still seeing a large number of RCValue objects, and an almost equal number of 
Arrays created but never destroyed.

Original comment by trentste...@gmail.com on 14 Apr 2011 at 8:13

Attachments:

GoogleCodeExporter commented 9 years ago
OK, thanks, will look into it closer

Original comment by aglad...@gmail.com on 14 Apr 2011 at 8:15

GoogleCodeExporter commented 9 years ago

Original comment by aglad...@gmail.com on 14 Apr 2011 at 9:27

GoogleCodeExporter commented 9 years ago
Squelched a couple of nasty memory leaks. Please try attached file.

Original comment by aglad...@gmail.com on 15 Apr 2011 at 5:13

Attachments:

GoogleCodeExporter commented 9 years ago
Very speedy work, thank you! The leak seems to have been fixed. I don't see any 
objects going crazy in the profiler! Time to get back to work. Don't forget to 
update the downloads page. :)

Original comment by trentste...@gmail.com on 15 Apr 2011 at 5:18

GoogleCodeExporter commented 9 years ago
Glad I was able to help. Will release a new version soon and update the 
downloads page accordingly.

Original comment by aglad...@gmail.com on 15 Apr 2011 at 5:20