Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Separate public object or property of public obj?
Message
From
25/05/2008 15:22:21
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01319132
Message ID:
01319425
Views:
17
>I'm not sure which is better in terms of memory management. In terms of OOP, neither is appropriate IMO. You're trying to emulate the old dBASE procedure library. The correct way to do this IMO is to build the class library into your application and then instantiate objects and call methods as needed.
>
>If you really want SET PROCEDURE behavior, that's still available to you, no need to use a class or object at all.

Yes and no. The only wrong thing about this is the name (and implied purpose), "Common". Describes the availability and not what does it do.

But other than that, if these things were logically grouped into classes, that's the commonly used singleton pattern.

And the answer to Dmitri: you can actually do both:
oapp.newobject("oThing", "mythingclass","mythingclass.prg")
public oThing
oThing=oApp.oThing
Just watch it when you release them - release the public variable before you release oApp.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform