-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video memory leak #562
Comments
Actualy it should be fixed by #563 https://github.com/away3d/away3d-core-fp11/blob/5c8c16d1d9748898c070cbc6bb5202e9b5c1b548/src/away3d/animators/ParticleAnimationSet.as Of course I can only talk about it, but I think that the Away3D team should as something to solve this problem .... |
the explaination for not disposing animators automatically is quite simple. Animators can be shared between meshes and therefore aren't disposed with a mesh. It similar to our policy on disposing geometry data, which we don't try to do automatically when disposing a mesh because it could be being used by other meshes Of course, we could create some complex logic to monitor all this stuff and count references etc... but this is not the away3d way. we want to keep things straightforward in the api and keep processing and "magic" behaviour to a minimum. As long as the user is aware that they have to clean up after themselves, we feel it is a better solution, keeping control for these sorts of steps in the hands of the user. |
But why in situation when u clone mesh animator cloned. So if u want to share animator between 2 mesh u should remove animator from mesh, then clone mesh, then add animator if u dont want to create unused clones of animator. Isnt better to do for dispose same logic. Animator can be removed from Mesh before dispose if it shared. Share animator is less common than the standard operation like dispose or clone of mesh. So it easy to do that manually actions few time in project then dispose every child or animator always when u dispose container or mesh. Just think how it for some one who use away for first time. He Load objects, add particle animation and after fev minuts of application work have exception because ram or vram is over. And ofc he will think "What? I call dispose why memory isnt free" he does not even know about Object3DContainer.dispose is just "remove from parent" etc.. |
I don't think we can reliably implement what you are suggesting without complexities arising. Better to have the developer aware from the start they have to manage their animators than try and second guess what they require. |
also sprite didt have method to free memory :) |
Many vertex buffer never disposed.
For example: AnimationSubGeometry.as create vertex buffers, but never dispose them. May be in another place same situation. I will investigate that more.
The text was updated successfully, but these errors were encountered: