santosh.a Posted May 21, 2014 Share Posted May 21, 2014 I have created xml like Xml test = new Xml(); after that added few child for(int i = 0; i < 100; i++) { test.addChild("test" + i); } saved the xml using test.save("test"); When i run console command world_memory_usage it say xml has 'x' mb usage after that i deleted xml using delete delete test; after deletion i checked again world_memory_usage it showed the same 'x' mb usage did i forget anything which need to be done before delete xml for clearing memory? Link to comment
ulf.schroeter Posted May 21, 2014 Share Posted May 21, 2014 I am NOT 100% sure, but as Unigine internal script garbage collection not always kicks in immediately (e.g. every frame) you shouldn't expect an immedeate drop of allocated pysical memory. Maybe it will be released later or only after exceeding some memory limit. Link to comment
santosh.a Posted May 22, 2014 Author Share Posted May 22, 2014 Thanks for the quick reply, Ulf. Actually it does not deallocate the memory until the exe is shutdown. In fact this issue is creating a memory leak that's crashing the exe within a few minutes. Link to comment
ulf.schroeter Posted May 22, 2014 Share Posted May 22, 2014 Ok, then Unigine crew should have a look on issue. Link to comment
silent Posted May 22, 2014 Share Posted May 22, 2014 Hi santosh.a,Thank you for the detailed description! I've made a simple test scene with your code, could you please confirm that Memory, Heap, Allocation counters from profiler are not increasing when you open test_xml world? Please, correct scene if I made a mistake. Actually, memory allocations starting to grow in debug build when world_memory_usage command is being executed (uncomment line 26 in script). I will ask developers if this is actually bug or not. Thanks! xml_test.zip How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
santosh.a Posted May 26, 2014 Author Share Posted May 26, 2014 Hi silent, Memory and heap allocation counters increase and after deleting they don't decrease. Thanks Link to comment
silent Posted May 26, 2014 Share Posted May 26, 2014 Hi, Could you please provide scene with xml which cause engine crash? I can't reproduce memory leak with only XML code. However, world_memory_usage will cause memory increase, if called every update, because it prints a lot of info directly into the console. To avoid memory growth you can call clear command. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts