Subj : Re: Problem with static member function To : borland.public.cpp.borlandcpp From : Vimal Aravindashan Date : Tue Jan 13 2004 05:43 pm Sameer wrote: > The Pointer pObj2 contains NULL value when the Create()function returns: > static Temp* Create(Temp* p){ p here is a different pointer but points to the same address that the actual parameter points to. i.e. Any changes you make to p will _not_ be reflected in the passed param (pObj2). But changes can be made to the object at the address pointed to. > p=pT; The above statement will change the address pointed to by p but not that pointed to by pObj2. > static Destroy(Temp *p){ > delete p; > p =NULL;} Same as in the earlier case, the object pointed to by p(and pObj1, since its both the same) will be destroyed and p will be set to NULL, but not pObj1. Vimal. .