Then you should probably not have used a local variable definition.
@prasad_N:
Or at least written it as a commented-out line, with an explanation that "obj" is a class member variable. How are we to understand that when you write it as you did, you weren't posting your actual code? A lot of the discussion here was based on your incorrect posting, and it could have been avoided if you had posted the actual code in the first place.

C++ programmers can also use pointers and can use references for the special case where the alias can be initialized with the address of the object, e.g. passing a reference to a constructor, storing it in a reference member.
And this has the added benefit over storing a pointer member variable in that you are absolutely assured that the member variable is a valid reference to an object instance, whereas anything can be assigned to a pointer member, including nothing.