Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 11/10/2011 05:14 AM, Caolán McNamara wrote:
On Wed, 2011-11-09 at 18:05 -0500, Andrew Douglas Pitonyak wrote:
I assume that this would check for an array as well.

I would feel safer if pointers were set to NULL (or nullptr if we
support C++11) since it is not safe to delete a pointer twice.
?, convert all delete to e.g. DELETEZ, i.e. delete foo, foo = NULL ?
Wouldn't be a fan of that, c++ is the language that it is, need to live
with that and not try and make it something that it isn't.

Setting a pointer to NULL after deleting the contents of the pointer is safe so that if you go to delete it again it is not a problem.

Sorry, I do not understand your reply with respect to trying to make C++ something that it is not.... and I would really like to understand.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.