3 1426
Can you explain what they mean by "instant member" for instance, in
the article about arraylists, it says it's thread safe but it's
instant members are not. What does that mean?
http://msdn2.microsoft.com/en-us/lib...ions.arraylist.
aspx
It's not "instant" (as in "immediate" ), it's "instance", meaning you need
to have an (instance of an) object to access that method.
See the "Add" method (and most of the other methods for ArrayList)
The opposite is "static" (I think it's "Shared" in VB) where you don't need
an instance. See the "ReadOnly" method and a couple of others.
Hans Kesting
"MagicKat" <Ka**********@Y ahoo.comwrote in message
news:eK******** ******@TK2MSFTN GP04.phx.gbl...
Can you explain what they mean by "instant member" for instance, in the
article about arraylists, it says it's thread safe but it's instant
members are not. What does that mean?
http://msdn2.microsoft.com/en-us/lib...arraylist.aspx
The term you refer to is "instance member". The caution in the cited
article, "Any instance members are not guaranteed to be thread safe", refers
to the fact that you can create an ArrayList to hold any "type", and that
you need to refer to the class definition for a given type to determine if
that type is thread safe.
It isn't "instant" members, it is "instance" members.
Instance members are members that are not shared (static).
So if the method is not shared/static, it is not thread safe.
On Jul 17, 7:22 am, "MagicKat" <KatMagicB...@Y ahoo.comwrote:
Can you explain what they mean by "instant member" for instance, in the
article about arraylists, it says it's thread safe but it's instant members
are not. What does that mean?
http://msdn2.microsoft.com/en-us/lib...ions.arraylist...
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Scott Brady Drummonds |
last post by:
Hi, everyone,
I'm still learning Python as I develop a medium-sized project. From my
previous experience with C++, I've burnt into my mind the notion of
information hiding. I'm having trouble understanding to what extent I
should follow this policy in my Python code so I thought I'd ask the group.
I read from a previous post that to attain a private-like status of member
variables, I should prefix the variable name with two...
|
by: Me |
last post by:
Hi, I would like learn from people with experience in C++, which of the
following styles of way to construct "get/set" member functions would be the
best in terms of usability, speed, et cetera.
The following class with be used as an example:
class MyClass {
public:
// member function would go here.
private:
int data_;
|
by: Jian H. Li |
last post by:
Hello,
What's the essential differences between the two ways of "class::member"
& "object.member"(or object_pointer->member)?
class C{
public:
void f() {}
int i;
};
|
by: Gianni Mariani |
last post by:
I remember seeing a neat template specialization trick posted here a few
months ago that allowed the detection of a type containing a member.
After a day searching through google archives I come up zip.
Anyhow, after much trial and error I came up with this. This
"contains_member" template sets value to 1 if the type D contains
a typedef named MEMBER of type TD.
|
by: Lenonardo |
last post by:
Hi.
I'm writing a VB.Net application to update multiple Excel Worksheets.
I'm using late binding (i.e. all variables are objects + use
createobject)
I develop the application on an XP machine with Excel 2002 (version 10.0)
installed - and the code works fine.
I then test the code on a laptop running Excel 2000 (version 9.0) and it
| |
by: Lionel B |
last post by:
I have a function which takes a functor argument. I which to call it for a
functor which is actually a class member; this works fine, using
the mem_fun_ref and bind1st functions (see listing 1 below). Or, rather,
it works fine as long as my member functor is const. The problem comes
when I wish to use it for a *non*-const functor (see listing 2 below):
*** Start listing 1 ***************************************************
// test1.cpp
|
by: Gianni Mariani |
last post by:
I'm hoping someone can tell me why using member address of works and why
using the dot operator does not in the code below.
The code below uses the template function resolution mechanism to
determine wether a class contains a member. My understanding is that if
a template function has an error during resolution of the function
types, it is quietly eliminated from the resolution process. This can
be used to detect things that would...
|
by: Jess |
last post by:
Hello,
It is said that if I implement a "swap" member function, then it
should never throw any exception. However, if I implement "swap" non-
member function, then the restriction doesn't apply. Can somebody tell
me why?
Thanks,
Jess
|
by: viki |
last post by:
We have zillion of instances inf instance->m_member in the code.
We are going introduce the 'accessors' Get() and Set() for m_member,
and
m_member going private (and renamed, too). We would like to leave, if
possible,
refs inst->m_member in the code, but make compiler translate
it to inst->Get() invisily, and without using macros. Let's assume T
is
a type of m_member.
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |