Re: C++ / JNI memory leakage, help needed
George Neuner wrote:[color=blue]
> On 3 Apr 2004 23:50:20 -0800, andreas.toresat er@aetdata.com (Sambucus)
> wrote:[color=green]
>>However i had tried to use something like this:
>>
>>return env->NewStringUTF(o utput);
>>
>> }
>> __finally
>> {
>> output= NULL;
>> delete [] output;
>> size=NULL;[/color]
>
> C++ itself doesn't have a "finally" keyword, but Microsoft compilers
> support a "try-finally" construct as a language extension.[/color]
[...]
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.
--
Asko Seeba
George Neuner wrote:[color=blue]
> On 3 Apr 2004 23:50:20 -0800, andreas.toresat er@aetdata.com (Sambucus)
> wrote:[color=green]
>>However i had tried to use something like this:
>>
>>return env->NewStringUTF(o utput);
>>
>> }
>> __finally
>> {
>> output= NULL;
>> delete [] output;
>> size=NULL;[/color]
>
> C++ itself doesn't have a "finally" keyword, but Microsoft compilers
> support a "try-finally" construct as a language extension.[/color]
[...]
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.
--
Asko Seeba
Comment