Re: getline 'free' problem
Re: getline 'free' problem
- Subject: Re: getline 'free' problem
- From: Jason Foreman <email@hidden>
- Date: Wed, 16 Sep 2009 09:42:44 -0500
On Sep 16, 2009, at 5:41 AM, Aron Nopanen wrote:
Hi All,
Not a Cocoa problem as such, but not sure if there's a better list
for it:
For this question, Xcode-users is probably a better list.
On Snow Leopard (using gcc 4.2), I'm getting a 'double free' error
in the guts of the C++ std::getline. The 'free' in question is being
performed by std::string::reserve. This happens any time I run
'getline' (reading from cin) on a fresh, virgin string. (The error
is only seen in the Debug configuration.)
Try removing these definitions from the preprocessor flags of your
Debug configuration: "_GLIBCXX_DEBUG=1 _GLIBCXX_DEBUG_PEDANTIC=1" I
think there are some issues when those are defined that can cause some
unexpected behavior, such as what you're seeing.
Jason
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden