Code: Select all
int main()
{
IVideoDriver *driver;
IGUIEnvironment *env;
ISceneManager *smgr;
GLOBAL::device = createDevice(video::EDT_DIRECT3D9, core::dimension2d<s32>(800, 600),16,false,true);
return 0xFE;
}
Code: Select all
int main()
{
IVideoDriver *driver;
IGUIEnvironment *env;
ISceneManager *smgr;
GLOBAL::device = createDevice(video::EDT_DIRECT3D9, core::dimension2d<s32>(800, 600),16,false,true);
return 0xFE;
}
Code: Select all
device->drop();
From irrlicht help:
When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.