473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

issues with Singleton from a simpleton j/k


How would Singleton help store an array in memory?

My understanding of Singleton is that it allows for a class design to have
overrides so that depending on the request the singleton class can respond
in more than one way or create more than one type of instance dependent on
the singleton class request.

Should I be worried about creating an in memory array object that:

Can be called concurrently from multiple in this case web page requests that
are
using the in memory array to query if those array values are in use or
residing on the stack. What is a good way to query items on the stack?


Dec 14 '05 #1
2 949
A singleton is a design pattern that describes a class that when instantiated
will only create a single object instance that can be shared by all users of
the class. (Like making the instance global).

Here is a link on ways to implement singletons using C#. (You can
translate to VB).

http://www.yoda.arachsys.com/csharp/singleton.html

"segue" wrote:

How would Singleton help store an array in memory?

My understanding of Singleton is that it allows for a class design to have
overrides so that depending on the request the singleton class can respond
in more than one way or create more than one type of instance dependent on
the singleton class request.

Should I be worried about creating an in memory array object that:

Can be called concurrently from multiple in this case web page requests that
are
using the in memory array to query if those array values are in use or
residing on the stack. What is a good way to query items on the stack?

Dec 15 '05 #2
Segue,

Have a look in VB Net to shared class.

In a webpage the information in it is shared by all clients that are active
for that application.

Cor
Dec 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Tim Clacy | last post by:
Is there such a thing as a Singleton template that actually saves programming effort? Is it possible to actually use a template to make an arbitrary class a singleton without having to: a)...
1
by: Richard A. DeVenezia | last post by:
foo() generates elements with event handlers that invoke foo function properties. Is this an abhorrent or misthought pattern ? It allows just the one occurence of identifier /foo/ to be changed...
10
by: E. Robert Tisdale | last post by:
Could somebody please help me with the definition of a singleton? > cat singleton.cc class { private: // representation int A; int B; public: //functions
3
by: Harry | last post by:
Hi ppl I have a doubt on singleton class. I am writing a program below class singleton { private: singleton(){}; public: //way 1
5
by: Pelle Beckman | last post by:
Hi, I've done some progress in writing a rather simple singleton template. However, I need a smart way to pass constructor arguments via the template. I've been suggested reading "Modern C++...
1
by: A.J. | last post by:
I'm writing an application that will run as a Web Service. It will communicate with some old COM DLLs. These COM objects need to be called on their own thread. In a regular Web Service I would...
5
by: Ajay Pal Singh | last post by:
Hi, I've one question related to singelton implementation of a class. Suppose a class is as Singelton and contains a public method. If there are more than one requests for the same method...
1
by: viz | last post by:
hi, i am curious about simpleton classes. i want to know that is it sensible to derive from a simpleton class or should they be used directly. please help Thanx
3
weaknessforcats
by: weaknessforcats | last post by:
Design Pattern: The Singleton Overview Use the Singleton Design Pattern when you want to have only one instance of a class. This single instance must have a single global point of access. That...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.