AngelScript revision 1996.
Array (at least, not check other types) not released and as result I have leaked arrays and stored pointers in it.
Script
void main()
{
mytype@[] a;
myfunc(a);
}
Native
RegisterGlobalFunction( "void myfunc(mytype@[]@+ a)" )
ScriptArray* b = 0;
void myfunc(ScriptArray* a)
{
// 'a' have refCount == 3 at input, this is correct?
if (!b)
{
b = a;
b->AddRef();
}
}
Then I skip few frames and in 'b' I see always 2 (in debugger), not 1 as expected.
Please check this moment.