Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with pointing to parent?
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00779176
Message ID:
00779178
Views:
20
>I have an object that has as one of its properties a pointer to a line item object. When I add the line item object, I set a property on there that points to the parent because it sometimes needs to get information from its parent.
>
>I haven't had any problems I can pin on this arrangement so far, but when I was looking in the debugger for something else, it occured to me that I've created a circle. The parent points to the child which points to the parent which points to the... I actually drilled down a ways in the debugger.
>
>Is there any problems with this that might come up? As I said, it seems to be working with no errors. I'm just worried there may be hidden problems like using too much memory or sumsuch.
>
>Thanks,
>
>Michelle

If the object is being added with a This.AddObject call, it should have a Parent reference on it.

If the object is being added with This.Property = createobject(), it would not have a Parent reference.

The only thing I have seen, is in a release, it may not be able to release properly with a manual link to This.Property = ThatObject

Tracy
Tracy
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform