L
Laura Stern
Guest
I'm glad you all addressed the issue of how errors are handled when they are raised in a FINALLY block. However, here we are not raising an error in the FINALLY block. We are doing RETURN ERROR. That is different. That will always do the same thing, regardless of whether you have an ON ERROR, UNDO THROW directive. It will return and then raise error in the caller. Besides all of that, it really has nothing to do with the original question which is why there seems to be a memory leak. If you execute a DELETE statement on a handle, it will go away. Then, even if you were to raise error in the same block, that does NOT undo the DELETE. And in this case you are not even raising error in the block. I believe this has to do with the fact that the parameter is INPUT-OUTPUT. Why is that? If you are deleting the TT in the routine, it clearly is not meant to be returned to the caller. If you change it to INPUT, the leak goes away. But still - this does seem like a bug to me.
Continue reading...
Continue reading...