assigning object from other object

if i want to do the assignment

object1 = object2

does it copy to object1 a pointer to object2 or the entire object2?


it matters to me because of:
1)space allocation usage
2)if i change value in property in object 1 will it change also in object2?
3)do i need to use new first for object1 before the assignment?

thanks

dolev

Comments

  • : if i want to do the assignment
    :
    : object1 = object2
    :
    : does it copy to object1 a pointer to object2 or the entire object2?
    :
    :
    : it matters to me because of:
    : 1)space allocation usage
    : 2)if i change value in property in object 1 will it change also in object2?
    : 3)do i need to use new first for object1 before the assignment?
    :
    : thanks
    :
    : dolev
    :

    it copies the reference, not the object, that can answer the other questions.
    {2}rIng

  • just wanted to say thanks for the replay (-;


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories