joshua.cook Posted February 9, 2015 Posted February 9, 2015 So, I have something nice and simple. Unigine::Engine *engine = Unigine::Engine::init(UNIGINE_VERSION, acrgc, argv, NULL); for(initialize for loop) { Unigine::ObjectDynamicPtr obj = Unigine::ObjectDynamic::create(); *do stuff - even if all of this is commented out it crashes Unigine::Editor::get()->addNode(obj->getNode()); } While(engine->isDone() == 0) { engine->update(); engine->render(); engine->swap(); } The problem is that it always crashes on update. I've tried to release the obj Ptr but that doesn't work either. Anybody have an idea?
joshua.cook Posted February 9, 2015 Author Posted February 9, 2015 Found the solution. When I was releasing I was releasing the node; not the dynamic object. Cut and paste error on my part.obj->getNode()->release() instead of obj->release(); Works now.
Recommended Posts