Page 1 of 1

Parallel routine memory leak?

Posted: Tue Oct 09, 2007 9:27 pm
by yuiduan
Hi
I begin to write parallel routine/functions with my rust c++ knowledge. By looking through this forum, I am still not sure if DS engine is handling memory deallocation. For example, if my function is returning a char*, and the DS engine does not free the memory for that pointer, how can I free from the function itself?

Any feedback will be appreciated.

Thanks.

Posted: Wed Oct 10, 2007 2:52 am
by iDomz
Obviously, you cannot free it from the function you are returning from. You may be able to work-around it by handling it the way pl/sql procedures work - making your return parameter as input.

I had the same doubt but the gurus have told me to trust ds on this. Had created a string replace function to test it out and could not see any leaks even after muching thru millions of records, so I am pretty much a convert now

Posted: Wed Oct 10, 2007 5:29 pm
by yuiduan
iDomz
Thanks a lot for your reply. I tend to believe the DS engine should free the memory from the function. Your expirement enhances my believing.
Cheers

Posted: Fri Oct 12, 2007 10:09 am
by kavuri
yuiduan,
if you satisfy with the answer please mark the posting as resolved.


Kavuri