By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,378 Members | 3,020 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,378 IT Pros & Developers. It's quick & easy.

this pointer - deletion

P: n/a
Can we delete 'this' pointer in C++.
If so how can we delete this pointer?
If not why?

Aug 9 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
sr*********@gmail.com wrote:
Can we delete 'this' pointer in C++.
If so how can we delete this pointer?
If not why?
Why would you want to?

--
Ian Collins.
Aug 9 '07 #2

P: n/a
On Aug 9, 12:31 pm, srini4va...@gmail.com wrote:
Can we delete 'this' pointer in C++.
If so how can we delete this pointer?
If not why?
http://www.parashift.com/c++-faq-lit...html#faq-16.15

-N

Aug 9 '07 #3

P: n/a
sr*********@gmail.com wrote:
Can we delete 'this' pointer in C++.
If so how can we delete this pointer?
If not why?
Yes, you can delete the this pointer.

After calling "delete", you must not reference any non static member
variables or non static functions. Anything that causes you to
dereference the "this" pointer is bad news.
Aug 9 '07 #4

P: n/a
Ian Collins wrote:
sr*********@gmail.com wrote:
>Can we delete 'this' pointer in C++.
If so how can we delete this pointer?
If not why?
Why would you want to?
Please ignore the above, I misread the question....

--
Ian Collins.
Aug 9 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.