Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cleaning up object references
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Cleaning up object references
Divers
Thread ID:
00167010
Message ID:
00167010
Vues:
61
I'm starting to write more apps. using objects instead of functions/procedures. In a current app, almost everything is an object, and there isn't a user interface (except for a diagnostic screen that can be turned on/off in the configuration program). As I'm writing this, I'm starting to realize I don't understand where/how to release all of my objects to clean up things. Here's how the program currently works:

main.prg - creates main object

mainobj - creates two different objects it uses for processing. If the debug mode is on, it also creates a dianostic screen where messages appear as things are processed. All the objects maintain references to the other objects, for example:

In my MainObj:
THIS.oSecond = CreateObject("SecondObj")
THIS.oSecond.oMainObj = THIS

I'm trying to do two different things. If the diagnostic screen is running, if I close it I want all the other objects/programs to quit. I'm also thinking about file-based messaging to be able to close this app if the diagnostic screen isn't running. Right now, I've tried a bunch of combinations of things to release these objects, but I'm fairly sure they aren't working (since after "closing" the app, I can't edit it in VFP because VFP says it's in use).

Thanks,
-Paul

RCS Solutions, Inc.
Blog
Twitter
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform