cocos2d lua binding return vector of std::string

Hello there,
I have the following problem.
I have some fast routine that is written in C++ that returns a vector of strings.
The following code is an example that doesn’t work, when I’m building the simulator:

cocos2d::Vectorstd::string MyClass::stringTest()
{
Vector std::string test;
test.push_back(“Man”);
test.push_back(“Woman”);
return test;
};

I then read that I have to use Value. I reaplced my code with


Value MyClass::stringTest()
{
cocos2d::Vector < Value * > result=new cocos2d::Vector< Value* >();
for(int k=0;k<10;k++)
{
Value part(“Value test”);
result.push_back(part);
}
Value output(result);
return output;
};

and it still doesn’t work:
error: ‘class cocos2d::Value’ has no member named ‘release’.

How do I correctly construct the vector of string values and return it from a function to use it in Lua?

As soon as I published my question I found the correct way.

Value MyClass::stringTest()
{
std::vector result(0);//=new std::vector();
for(int k=0;k<10;k++)
{
Value part("Value test ");
result.push_back(part);
}
Value output(result);
return output;
};