Hi Jay,
>A coworker also questioned this method due to possible memory leaks on the created object.
It depends on what these properties contain and how long the object is alive after the form has been released. Normally you wouldn't keep the object around for long after you closed the form. The calling form receives the object, reads all property values and then releases the object. Memory leaks would occur under two circumstances:
a) The property object contains not only simple values, but also object references. In this case you have to set all properties to NULL (or some other value) before the return variable goes out of scope:
DO FORM FormB TO loReturn
loReturn.oReference = NULL
loReturn = NULL
b) Form B has a private datasession and you keep the object alive. Since the parameter object belongs to the same datasession as form B, the datasession won't go away until you release the parameter object. Therefore you shouldn't keep the return object, but read the values and release it.
--
Christof