473,568 Members | 2,795 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 955
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
12466
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) explicitly make the arbitrary class's constructor and destructor private b) declare the Singleton a friend of the arbitrary class
1
2027
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 to /whatever/ when need arises and everything should still work. function foo () { var callee = arguments.callee
10
2626
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
3917
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
5296
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++ Design" or similar books, but I feel there are full of clever guys here who could help me out.
1
1378
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 create a pool of objects that I call so I don't have to instantiate, log in, etc, on each Web Service call. How can I do this? Are there...
5
3725
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 simultaneously. How the dotnet runtime handles this scenario. Will it force the second request to wait the till the execution of first request for the...
1
1822
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
18232
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 is, regardless of where the object is hidden, everyone needs access to it. The global point of access is the object's Instance() method. ...
0
7693
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7604
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7660
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5498
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.