{"comment":{"created_at":"2011-10-17T10:09:51Z","body":"I guess I don't know how priorities are assigned to bugs.  I see that several new issues have been raised, assigned, and even fixed in the time since I reported that Away3D.Beta has a Memory Leak which would prevent it from being deployed in any production environment.  I would think that would be a pretty high priority problem.\r\n\r\nSo, during those 48 hours I have spent another 15 hours reading through the code, writing test cases, and checking to determine when the problem arises.  It is related to MyCube versus YourCube, but it has nothing to do with the implementation of the MyCube Mesh that is incorrect.  What is different is that MyCube allows the user to apply different materials to each of the cube's six sides, so it uses SubMeshes.  The framwork's build-in primitive Cube does not support a SubMesh configuration.\r\n\r\nThe current implementation of Mesh.dispose((), neither deep nor shallow, correctly handles the fact that there is a reference to the parentMesh held by each SubMesh.  As long as that reference is held, a Mesh object cannot successfully be removed from the Scene3D's \"root\" ObjectContainer3D.  Any test of any well-behaved Mesh object will show the Memory Leak\r\n\r\n I hope that some resources can be applied to getting the bug fixed.","updated_at":"2011-10-17T10:09:51Z","url":"https://api.github.com/repos/away3d/away3d-core-fp11/issues/comments/2427029","id":2427029,"user":{"gravatar_id":"b3c67a1ae3b1609487322e8f5b8ea82b","avatar_url":"https://secure.gravatar.com/avatar/b3c67a1ae3b1609487322e8f5b8ea82b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/tcorbet","id":894264,"login":"tcorbet"}},"action":"created","issue":{"number":154,"created_at":"2011-10-16T09:18:54Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I've spent a good deal of time over the past three days trying to determine why my application has a memory leak.  I assumed it was either an error in my code or in my understanding/use of the Away3d API.  So, I finally implemented a version of Connolly's MemoryTracker: http://divillysausages.com/taxonomy/term/7?page=1.  Using that, and winnowing the application down to the least amount of code which demonstrates the leak, I now believe that the problem is in the Away3D code rather than mine.\r\n\r\nWhatever tooling you use for regression tests don't seem to be visible here and I only find two Broomstick demos which call any of the dispose methods.  Those don't represent any sort of stress test and they only entail the use of the dispose method at the level of the Mesh.  It is probably more common that Mesh add/remove takes place in an ObjectContainer3D, but after hours of testing at that level, I found that the leak can be detected even in the simpler case of individual Mesh objects being added/removed from the scene.\r\n\r\nSo I am opening this bug.  Not seeing any facilities here for attachments or file uploads.  Presumably when I hit 'submit' a reference number will be assigned, so I will post the files that I have prepared over there.  I hope the files will make it easy for you to witness the leak and diagnose it.\r\n\r\nWhether it turns out to be my misuse of the API or a problem in the Away3d framework for Molehill, I hope it can be quickly fixed so that I can release my application.  The use case of that application, as currently architected,  requires that Mesh.dispose() works with its depth argument set to false.  It is my understanding that retention of the Mesh object's SubGeometry should not result in a memory leak; it should result in better performance [from not having to recreate the Geometry for each instance] and a lower memory footprint [because there are, at any point in time, many Mesh Objects which share that common Geometry].\r\n\r\nIn my testing, unfortunately, the memory leak occurs whether with depth set true or false.  My measurement tool is not fine-grained enough to tell me what the rate of leakage is in each case.  You would guess that they would be different and they probably are, but the rate of memory consumption growth is very comparable whichever way the test is run.","comments":4,"title":"Memory Leak","updated_at":"2011-10-17T10:09:51Z","url":"https://api.github.com/repos/away3d/away3d-core-fp11/issues/154","id":1920950,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"b3c67a1ae3b1609487322e8f5b8ea82b","avatar_url":"https://secure.gravatar.com/avatar/b3c67a1ae3b1609487322e8f5b8ea82b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/tcorbet","id":894264,"login":"tcorbet"},"html_url":"https://github.com/away3d/away3d-core-fp11/issues/154","labels":[],"state":"open"},"legacy":{"issue_id":1920950,"comment_id":2427029}}