// 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
🎉 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
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:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement