Hi all,
I have a class say A and created a pointer to call this class like
A *obj=NULL;
obj=new A( );
After I perform all the operations within the code and try to delete this pointer using
delete obj;
obj=NULL;
I get an exception as
" the instruction at "0x7c910f 2b" REFERENCED MEMORY AT "0x00000004".th e memory could not be "read".Clic k OK to terminate the program.
I am not able to figure it out.
If i dont delete it the code runs smoothly.But always have to delete after use once allocated.The whole code is within a function block.
Could anyone please suggest me.
Thanks .
I have a class say A and created a pointer to call this class like
A *obj=NULL;
obj=new A( );
After I perform all the operations within the code and try to delete this pointer using
delete obj;
obj=NULL;
I get an exception as
" the instruction at "0x7c910f 2b" REFERENCED MEMORY AT "0x00000004".th e memory could not be "read".Clic k OK to terminate the program.
I am not able to figure it out.
If i dont delete it the code runs smoothly.But always have to delete after use once allocated.The whole code is within a function block.
Could anyone please suggest me.
Thanks .
Comment