Dynamic object leak - TABLE-HANDLE/DATASET-HANDLE parameters
We're doing some analysis/testing on the sonar-openedge plugin across our 2m+ lines of application code before purchasing a license. Some of the scenarios for detecting memory leaks are working (some we didn't even know we had), but there are a couple that aren't being detected.
procedure Procedure_With_InputOutput private:
define input-output parameter table-handle vPrivateTableHandle.
// no delete object, this is a memory leak
end procedure.
In this scenario, vPrivateTableHandle needs to be deleted, as it will have been copied. It's not raising a violation for the "dynamic object leak" call.
Another scenario would be:
run Procedure_With_Output(output table-handle vTableHandle).
procedure Procedure_With_Output private:
define output parameter table for ttFoo.
end procedure.
vTableHandle is an OUTPUT TABLE-HANDLE, so it's the callers responsibility to delete it.
I'm not sure how easy these are to implement, especially when incorporating BY-REFERENCE, REFERENCE-ONLY and BIND options.
We will add this request to the backlog.