Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Sharing an instance of an object between classes.

$
0
0

Not sure how the login requirement fits in but the usual approach is to implement the singleton pattern:

en.wikipedia.org/.../Singleton_pattern

Essentially, a class with a static method that maintains a single instance of an object. The class has a private constructor so all those that require the object must do so through the get_Instance method.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>