Advertisement

RefCount on exception

Started by April 12, 2009 10:12 AM
1 comment, last by WitchLord 15 years, 7 months ago
Hello. It is problem with reference counting on exception (and maybe only in constructor). 2.16.0 WinXP x86. Reproduce:

class SomeClassA
{
	int A;

	~SomeClassA()
	{
		printf("destruct");
	}
}

class SomeClassB
{
	SomeClassA@ nullptr;
	SomeClassB(SomeClassA@ aPtr)
	{
		this.nullptr.A=100; // Null pointer access. After this class a is destroyed.
	}
}

void test()
{
	SomeClassA a;
	SomeClassB(a);
}


I'll investigate this. Thanks.

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

Advertisement
I've checked in the fix for this problem now.

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

This topic is closed to new replies.

Advertisement