Try OpenEdge Now
skip to main content
Object-oriented Programming
Programming with Class-based and Procedure Objects : Comparing handles and object references : Using handles
 

Using handles

HANDLE variables and HANDLE temp-table fields are weakly-typed. A handle can be used as a reference to virtually any kind of handle-based object, such as a procedure, a visual object (widget), or a data object such as a buffer or query. Because handle references are set at run time, the AVM does not (and indeed cannot) verify much of anything about how a handle is used at compile time. As a result, you can easily use a handle improperly, for example, invoking a buffer object method on a procedure handle object—an error that the AVM can only catch at run time. In addition, you must explicitly delete all handle-based objects that you create using a DELETE OBJECT statement or another appropriate DELETEkeyword statement, or you risk a memory leak.