i hav a doubt on memory leaks..
ok..we can assign a base pointer to a derived pointer(since derived has base+its own member functions)

lets say we hav
Base *baseptr = new Base;
Derived *derivedptr = new Derived;
baseptr=derivedptr;
delete baseptr;

Now if i call Delete baseptr..will it delete
whatever base pointer currently points to?
if this is true, there is no way i can access the actual(i.e before it was assigned to derivedptr) base pointer's contents..
Is this a memory leak? if so, what are the possible solutions?