simakov.artem Posted September 25, 2018 Share Posted September 25, 2018 Hi all! Within one world I need to load, then unload and again load nodes which contains many objects (node at binary format, all object's meshes are inside node). The load happens so: void load(const char* name) { NodePtr node = World::get()->loadNode(String::format("%ssystem/%s.node", path.get(), name)); node->setParent(Editor::get()->getNodeByName("sys")); node->release(); Editor::get()->addNode(node->getNode()); } The unload happens so: void unload() { NodePtr node = Editor::get()->getNodeByName("sys"); if (node->getNumChildren() != 0) { Editor::get()->removeNode(node->getChild(0), 1); } } Apparently the problem is that when unloading the engine doesn't clean all removed to end. Eventually after several cycles "load-unload" I face serious memory leak. Is that engine problem or is it possible to fix code/node structure to avoid leak? PS: Also I have tried to removing nodes in loop (loop "for" for each child of removing node), but no luck. Link to comment
morbid Posted September 26, 2018 Share Posted September 26, 2018 Hello Artem, may I ask you to attach a test scene with implemented logic? Thank you. 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
simakov.artem Posted September 26, 2018 Author Share Posted September 26, 2018 Hi! When we build test scene, we discover, that problem is in other code's section, and fix issue. I apologize for the trouble. Link to comment
morbid Posted September 26, 2018 Share Posted September 26, 2018 It's okay, feel free to contact us! 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