I have sucessfully compiled both irrlicht and irrlicht .net
I did a comparison of the terrain example in both c++ and vb.net
(modified both to handle terrain scaling and recalculating the collisions and found)
in the .net I can not release any memory for anything even it is droped.
gc.collect doesn't do anything. (drop takes a item from a refernce count and deletes the item and - 1 from the count. remove in c++, seems like all the code is traced right)
Try making a scene in .net then scenemanager.clear()
Then check your memory in taskmanager (ctrl alt delete) , boom same as it was when you had everything loaded. C++ version has not done this to me at all.
Ok Anyone got a ideal how to fix this. It seems to me the "remove" c++ is not properly being called or the code does not reflect proper garbage collection. To be honest im pretty unfamilar in this area.
Does anyone got a code fix or can point me in the right direction to get this to dump memory properly like it does in c++.
Thanks a million in advance. I know i ask all the hard questions
Huge .net memory Problem.
I found a lot of memory problems with Irrlicht .NET since it has no Dispose method (which should release all the unmanaged memory used by the app) and this was not only one fix but a complete change in Irrlicht.NET.dll.
Anyway, do never trust CTRL ALT SUPPR when using .NET ... The memory system with .NET framework makes this information often wrong (try to create a new Windows Forms project, load it and reduce the application, then maximize it... you'll understand).
Anyway, do never trust CTRL ALT SUPPR when using .NET ... The memory system with .NET framework makes this information often wrong (try to create a new Windows Forms project, load it and reduce the application, then maximize it... you'll understand).
Irrlicht .NET complete and Cross Platform Wrapper
The kid on my avatar wrote:A painless lesson is one without any meaning
Thanks for the reply, I did a bit more research and found that one way to fix this would be to make instance of the irrlicht unmanaged, then make a second wrapper to convert it to managed(can be done in the same code). Always deleteing itself in the desconstructor. I think over all it would make for a smaller .net wrapper that truely wrapps the functions of irrlicht. only converting from unmanaged to managed - this means little rebuilding of any function, only possible conversions of the data it passes.
I tried to implement some of this but ran into a abstract class and my lack of programing in this field has stoped me from attempting any more modifications to the existing .net project.
I am however slowly going to look at the proper way to make the wrapper for .net, I don't know if i will be sucessfull but i will start here with this tutorial I found that explains alot of what im trying to do. So eventully if htings go well I will have a .net wraper that works just as irrlicht does.
http://www.supinfo-projects.com/en/2005 ... dotnet_en/
Any suggestions or help from any of you would be highly appreciated. Im doing this in my spare time so don't expect anything from me. If i suceed I will be happy to give it to the comunity. if not well im learning alot.
I don't mind c++ as a language however the power and ease of vb.net makes me code what i imagin with out much thought. Its a great enviorment and I prefer it over any other language i have coded. Arguing that even though any other .net compiles to the same thing with same performence, I just like vb and its syntax. Why I am so interested in this wrapper and making it 100% working compatable with irrlicht. I have not found a better engine for my needs.
I tried to implement some of this but ran into a abstract class and my lack of programing in this field has stoped me from attempting any more modifications to the existing .net project.
I am however slowly going to look at the proper way to make the wrapper for .net, I don't know if i will be sucessfull but i will start here with this tutorial I found that explains alot of what im trying to do. So eventully if htings go well I will have a .net wraper that works just as irrlicht does.
http://www.supinfo-projects.com/en/2005 ... dotnet_en/
Any suggestions or help from any of you would be highly appreciated. Im doing this in my spare time so don't expect anything from me. If i suceed I will be happy to give it to the comunity. if not well im learning alot.
I don't mind c++ as a language however the power and ease of vb.net makes me code what i imagin with out much thought. Its a great enviorment and I prefer it over any other language i have coded. Arguing that even though any other .net compiles to the same thing with same performence, I just like vb and its syntax. Why I am so interested in this wrapper and making it 100% working compatable with irrlicht. I have not found a better engine for my needs.
there is also of course deusXL's c# wrapper, from his sig above...
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Well I looked into irrlicht.net cp, a great wrapper but This has the same memory problem as irrlicht.net
When i create a new terrain selector there is no way to release the memory properly. So my program gains 2 megs everytime i recreate the terrain collision map.
In c++ version of irrlicht selector->drop works and releases the memory with out issues.
irrlicht.net cp is a great wrapper and has parllax mapping and alot of cool features found in irrlicht.
Im still researching this wierd memory issues and trying to find how it can be solve with in the .net enviorment.
When i create a new terrain selector there is no way to release the memory properly. So my program gains 2 megs everytime i recreate the terrain collision map.
In c++ version of irrlicht selector->drop works and releases the memory with out issues.
irrlicht.net cp is a great wrapper and has parllax mapping and alot of cool features found in irrlicht.
Im still researching this wierd memory issues and trying to find how it can be solve with in the .net enviorment.
I told you, there's no way to really have the current amount of memory since with .NET the memory is really released only when the Operating System needs it.
Anyway, you can release by doing :
terrain.Dispose();
BTW I worked a lot on the memory system of the wrapper, you must know that when the object is no longer needed it calls drop() C++ function !
You should really try to do :
terrain.Remove();
terrain.Dispose();
And see what happens when the memory reaches the limit
PS : If you really want to see what I mean, minimize your app at anytime, you'll see the memory release into Windows' ctrl alt suppr
Anyway, you can release by doing :
terrain.Dispose();
BTW I worked a lot on the memory system of the wrapper, you must know that when the object is no longer needed it calls drop() C++ function !
You should really try to do :
terrain.Remove();
terrain.Dispose();
And see what happens when the memory reaches the limit
PS : If you really want to see what I mean, minimize your app at anytime, you'll see the memory release into Windows' ctrl alt suppr
Irrlicht .NET complete and Cross Platform Wrapper
The kid on my avatar wrote:A painless lesson is one without any meaning
I have to agree with DeusXL,
I have also done extensive test in terms of memory usage and disposal of unmanaged resources and I have found that with .NET the memory only gets released when needed.
I have not yet run into any memory problems, but I do have alot of it available. Perhaps someone alot wiser could perform a test to see if this is a big problem.. ?
Kind Regards
Celtic
I have also done extensive test in terms of memory usage and disposal of unmanaged resources and I have found that with .NET the memory only gets released when needed.
I have not yet run into any memory problems, but I do have alot of it available. Perhaps someone alot wiser could perform a test to see if this is a big problem.. ?
Kind Regards
Celtic