MEMPTR and SET-SIZE

I've not done very much with MEMPTR's before. Can anyone tell me whether Progress automatically deallocates memory when the MEMPTR variable goes out of scope, or do you have to deallocate manually with SET-SIZE(0).

I know which is the safest bet, but we have a bug in our program so I'm just trying to identify the real cause. I think the program is running out of memory (there are no explict deallocations) but looking at the help for SET-SIZE, there doesn't seem to be a way to detect whether the allocation was successful or not. Anyone know the correct way?

Thanks.
 

bendaluz2

Member
You have to deallocate them manually with set-size(0).

If you are not explicitly doing this for every memptr defined, then I would say this is the most likely cause of the problems you are experiencing
 
Top