Hi

Bisz István wrote:
> 
> The HBQT_RELEASE_WITH_DESTRUTOR method does not release the memory
> allocated by the operator new.
> 

But logs suggest that it does. Do it tells a lie ?



> The HBQT_RELEASE_WITH_DELETE_LATER method releases the allocated memory
> with a delay.
> 

So it should be out of our experiments then. I will remove from generator.



> The resources of the objects returned by the wrappers as return value are
> not released automatically by the GC system.
> We need here a general solution.
> 


For sure we need a general solution.
But the solution above is destructive,  I cannot even compile qtcore
after changes above to honour 

   hb_retptrGC( hbqt_gcAllocate_Q*( new Q*( hbqt_par_Q*( 1 )->somefunction(
hbqt_par_someparam( 2 ), someparamnext( 3 ) ) ) ) );

The reason is we never want a "new" object for return values it it is 
of type FAR. hbQT will not work at all as we will be dealing with local 
copy of the object in question. If the type is not FAR we can employ
this technique. This is what is employed currently.

The solution could be like ( and I did it initially ):

Construct a GC pointer which holds this pointer and releases the wrapper
returned pointer.

BTW I am not a C guru so I may be wrong.

Regards
Pritpal Bedi

-- 
View this message in context: 
http://old.nabble.com/%28no-subject%29-tp27183396p27185328.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to