Niko - Is this a bug?

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
MindGames
Posts: 32
Joined: Sat Jul 16, 2005 2:02 am

Niko - Is this a bug?

Post by MindGames »

I noticed that the in the destructor of the .Net IrrlichtDevice, it does not drop the native Device that it wraps. Shouldn't it?

If you try this it crashes.

Code: Select all

device = new IrrlichtDevice(DriverType.DIRECTX9, new Dimension2D(640, 480), 16, true, false, false);

// Do stuff ...

device.CloseDevice();
device = null;

// Want to restart
device = new IrrlichtDevice(DriverType.DIRECTX9, new Dimension2D(640, 480), 16, true, false, false);
Is there some reason why you don't drop the device?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

You're right. Strange. I'll take a look at it. :)
Locked