🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

class with size=0

Started by
1 comment, last by Maddi 18 years ago
Hi, In the Documentation you state that if a class is registered with a size of 0, it cannot be instanciated. While this is true for variables defined in a function, member variables of a class can still be declared without the @. This has the side effect that angelscript tries to release the uninstanciated object when cleaning up, which causes a very hard to trace access to an uninitialized pointer. Example:


// as Code

class test
{
 void func()
 {
   size0class testInstance; // This fails as expected
 }

 size0class m_instance; // This does unexpectedly not fail, but triggers an access violation
}

Whatsoever I really got used to as and Im really happy with it. Keep it up, Maddi
Advertisement
Ah, thanks for letting me know. I'll fix this before the release of version 2.7.0.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Great, Thanks !

This topic is closed to new replies.

Advertisement