Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Java in General
How to load only one object in memory?
Shadab Khan
Greenhorn
Posts: 20
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi
how do i make sure that only one object of my class is loaded in to memory at any given time??
Layne Lund
Ranch Hand
Posts: 3061
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This is called the Singleton
Pattern
. If you use
the Search tool
at the top of the page with the
word
"singleton," you will get plenty of examples about how to implement this in
Java
.
HTH
Layne
[ May 02, 2003: Message edited by: Layne Lund ]
Java API Documentation
The Java Tutorial
And then we all jump out and yell "surprise! we got you this tiny ad!"
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how many objects?
servlet interprocess communication
static methods
Can a object contain another object?
Difference between String s
More...