Dear Scott and Fritz,

Actually, my system made a lot of progresses according to your replies. I
really don't have enough experiences on C. So I need to improve.

I appreciate so much for your help!

Best regards,
Bing

On Mon, Jun 20, 2011 at 12:13 AM, Scott Ribe <scott_r...@elevated-dev.com>wrote:

> On Jun 19, 2011, at 9:28 AM, Bing Li wrote:
>
> > One more issue is that there was no memory leaking even if I didn't add
> the
> > line, free(receivedBytes). Why?
>
> Because it's stack-allocated, not allocated with any version of malloc. I
> pointed out the same mistake in my first email to you, yet here you are
> about a week later having re-introduced the error. Read an introductory book
> on C. Now. Before you waste any more of your time.
>
> What is the purpose of subLoopPool? There is now nothing in its scope that
> will cause any objective-C objects to be created, much less autoreleased.
>
> And that copy thing you tried... Seriously? Allocating a a string you own,
> then copying (& leaking) it, then autoreleasing the copy???
>
> You're just thrashing here, going back and forth between the same set of
> mistakes with no understanding of what's going on. AS YOU WERE TOLD MULTIPLE
> TIMES BY MULTIPLE PEOPLE, you had the memory management correct in this
> function, and were leaking the receivedMessage string elsewhere in your
> code. Yet here you are days later, still thrashing around with random weird
> pointless buggy changes to this function.
>
> I had intended not to respond to any more of these messages, but I decided
> to try one more time. I am now done. I will not try to help you again until
> you ask a question that demonstrates that you have listened to what you've
> been told about where your bug is, and have "done your homework" by getting
> some fundamental understanding of the language you're trying to use.
>
> (And by the way, you are probably nowhere near having a stable program.
> Based on what you've shown us so far, you should be prepared to be debugging
> for a while.)
>
> --
> Scott Ribe
> scott_r...@elevated-dev.com
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to