Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
(OOP) Part Time Composite Objects?
Message
From
27/08/2003 12:04:48
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
 
To
27/08/2003 10:54:09
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00822766
Message ID:
00823830
Views:
27
Chris,

<snip>
I'm unconditionally NULLing the MyChildObject reference in Destroy(), which should free the reference if it was pre-existing, and nuke the object if it was newly created.

You're correct, as long as the object whose property you're null-ing didn't instantiate MyChildObject. Otherwise, MyChildObject is now "undead." You can't access it, you can't kill it, but it's still there haunting and mocking you. Oh yeah, and hogging memory (symptoms include, but not limited to, memory leaks, forms that won't close, phantom data sessions, etc.)

This is one of the reasons you need to have code that looks disturbingly similar to:
IF VARTYPE(This.oMyChildObject) = 'O' and !ISNULL(This.oMyChildObject)
ENDIF
>I'm going to have to look into GetBizObject again, no need to reinvent the wheel. I think the only thing holding me back is being able to address the child object by name in code.

Not sure to what you're referring here. Are you saying that now you have an abstract method that works for all your objects, you're not sure how to use that abstraction to tell you about the specific object you need?

If so, I can show you some custom code we wrote to create object properties using our "standard" object nomenclature. If not, can you give me an example of your issue?

Hope that clears the air,
---J
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform