• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: C++ std::string tries to free() a not allocated pointer ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ std::string tries to free() a not allocated pointer ?


  • Subject: Re: C++ std::string tries to free() a not allocated pointer ?
  • From: Clark Cox <email@hidden>
  • Date: Wed, 18 Nov 2009 11:19:32 -0800

On Wed, Nov 18, 2009 at 10:45 AM, David Hayes <email@hidden> wrote:
> When you say the string length is zero does that mean that you are creating a std::string but not initializing it to any
> value?
>
> I would be surprised if it is using the stack.  If you are creating a string and not initializing it with any value I would
> guess that std::string is initializing the pointer to NULL and the destructor is not checking for a valid pointer before
> calling free or delete.

That can't be it; there is absolutely nothing wrong with calling
free() or delete on a NULL pointer.


--
Clark S. Cox III
email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >C++ std::string tries to free() a not allocated pointer ? (From: Jean-Denis Muys <email@hidden>)
 >Re: C++ std::string tries to free() a not allocated pointer ? (From: David Hayes <email@hidden>)

  • Prev by Date: dsymutil vs current FSF gcc VTA merge
  • Next by Date: Argument List Too Long?
  • Previous by thread: Re: C++ std::string tries to free() a not allocated pointer ?
  • Next by thread: Re: C++ std::string tries to free() a not allocated pointer ?
  • Index(es):
    • Date
    • Thread