L
Lieven De Foor
Guest
A persistent procedure can be compared with a class based object. Just like you "new" an object, you can persistently run a procedure. The procedure "persists" after the RUN statement (it is still there in memory, and you can run internal procedures in it). Eg. DEFINE VARIABLE libraryHandle as HANDLE NO-UNDO. RUN library.p PERSISTENT SET libraryHandle. RUN InternalProcedure IN libraryHandle. Be aware that unlike class based objects, persistent procedures don't get garbage collected when they go out of scope, so you'll have to explicitly delete them to prevent memory leaks: DELETE PROCEDURE libraryHandle.
Continue reading...
Continue reading...