[source][/source]Dear Andreas:
I found there's something strange about array constructor in 2.18.1.
I had a string class which is registered with reference.
The codes are similar with http://www.gamedev.net/topic/639252-asobj-ref-and-asobj-value-at-the-same-time/
and here is my testing code without fail
[source]import void SetCurrentModel(string) from "model2";
void test(uint idx)
{
string@[] models={"111", "222", "333", "444", "555", "666", "666"};
if (idx <=6) SetCurrentModel(models[idx]);
else
SetCurrentModel("");
}[/source]
If I change the string array codes like this
[source]import void SetCurrentModel(string) from "model2";
void test(uint idx)
{
string[] models={"111", "222", "333", "444", "555", "666", "666"}; //replace "string@ " with "string"
if (idx <=6) SetCurrentModel(models[idx]);
else
SetCurrentModel("");
}[/source]
There are some string memory leak in 2.18.1. (but that's fine in 2.17.0)
I couldn't point out the bug exactly, but I think there are 2 bugs with object reference array
1. value assignment operators on reference types
2. CScriptArray::Construct()