terminologi instaniating

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hi

I just wonder if it's correct to use the term instansiating in this example
Thread myCurrectThread = Thread.CurrentThread;
I mean there seems to be more correct to use the term instansiating when I
use the new keyword and really create a new object.

Here I just use the reference myCurrectThread to point to the currect
Thread.

//Tony
 
Hi

I just wonder if it's correct to use the term instansiating in this example
Thread myCurrectThread = Thread.CurrentThread;
I mean there seems to be more correct to use the term instansiating when I
use the new keyword and really create a new object.

Here I just use the reference myCurrectThread to point to the currect
Thread.

//Tony

You are copying a reference. Instantiate is defined as creating an
instance, which as you correctly state, you are not doing.
 
I just wonder if it's correct to use the term instansiating in this example
Thread myCurrectThread = Thread.CurrentThread;
I mean there seems to be more correct to use the term instansiating when I
use the new keyword and really create a new object.

Here I just use the reference myCurrectThread to point to the currect
Thread.

You are not instantiating a new object.

You are only getting a reference to an existing object.

This is a common term.

http://en.wikipedia.org/wiki/Instantiation_(computer_science)

says:

"Creating an instance of a class is sometimes referred to as
instantiating the class."

Arne
 
Back
Top