|
-
June 21st, 2010, 09:30 PM
#9
Re: Help with overloading operator delete
If what you claimed is true, how can you explain I can add an "int" as a second parameter to operator new? In the reference I don't see an "int" as a second parameter to operator new either. Thanks for your inputs.
 Originally Posted by Paul McKenzie
The explanation is that your code is invalid. The reference shows you what is overrideable and how to override using the proper function signature..
If a reference tells you "to do x, this is what is done", you don't try and do something different, hoping it works. Where in the reference do you see an "int" as a second parameter to operator delete?
The same reference is here -- it doesn't matter if it's delete[] or delete, they must be overridden using the proper signatures, otherwise they're bogus.
http://www.cplusplus.com/reference/s...ator%20delete/
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|