G
George Neuner
[...]George said:However i had tried to use something like this:
return env->NewStringUTF(output);
}
__finally
{
output= NULL;
delete [] output;
size=NULL;
C++ itself doesn't have a "finally" keyword, but Microsoft compilers
support a "try-finally" construct as a language extension.
This is actually the first posting I am catching from this thread and
sorry, if my posting is already hopelessly late, but what is the point
of assigning NULL to output and then deleting the output (being NULL)?
Shouldn't it be vice versa? For me, it seems like this is THE memory leak.
Yup! ... hopelessly late
The quoted code definitely leaks. The OP's is new to C++ and his
original code simply forgot to free the string. That error was dealt
with in the thread and the OP's latest inquiries concern C++ language
and compiler issues.
George
=============================================
Send real email to GNEUNER2 at COMCAST o NET