Graham Cox <graham....@bigpond.com> schrieb am 27.06.2009 05:13:37:

> Using GC may mean you can avoid even that small degree of necessary  
> care, but the ownership rules are straightforward, easily learned and  
> committed to mind, and are hardly arcane or arbitrary - they are  
> simple and logical. I'd really rather deal with that and the odd bug  
> where I forgot something than the performance hit I'm going to take  
> when GC kicks in. I know that this hit is small, but so is the effort  
> required to use retain/release, so it seems to me we are arguing about  
> small stuff here, not big stuff.

> I don't really get why the memory management/ownership rules seem to  
> be so hard for so many people. But I accept that they are, to some. If  
> they are, maybe GC is a godsend to those folk, but for everyone else,  
> I just can't see the big deal.

Hmm. I am new to Objective C and Software development on a mac. I am earning my 
money with software development on windows using Visual Studio / C#.

And in the managed environment. you get much more advantages than just 
something like "If some people cannot learn some basic memory management, then 
maybe something like that is good..." (Sorry, that is, what I mostly read in 
your argument. sorry when I got you wrong)

It simply has nothing to do with care. But there are a few facts:
1) Errors will be done as long as it is possible to do errors. It has nothing 
to do with beeing carefull or not.
2) I want the system to be secure. I don't want to have some kind of trustment 
in people I do not know.  I really like the managed environment, because it 
takes some security related stuff from teh shoulders of the developer.

Of course: All this stuff is not required! The "managed system" is not doing 
anything special. You can make sure, that there are no buffer overflows and no 
access to not initialized objects and all this stuff. But the past simply 
shows, that a lot of developer simply do not care or simply make errors. Just 
have a look at annoced security holes where people use such bugs to stop 
services or even get access to systems.

And the argument, that the GC will take some time when it starts to free memory 
(Which can also be a large hit in the .Net Environment. It simply depends how 
much work the GC has to do to free some memory that could be required....): 
What kind of application are we talking about? Is it really a problem to have 
such a short delay?  If such a small delay is not acceptable, maybe the whole 
system is not acceptable and you simply need a RTOS. (And what are you doing to 
make sure, that you do not have such delays? Are you sure, that the calls you 
are using now are completing in the time you are expecting?

Of course I am aware, that this is far away from the main discussion about the 
GC and the behaviour of the GC (Which I do not understand. If an object is no 
longer referenced inside my active code, I do not care when the memory is 
released completly. But I just started to read into objective-C / Cocoa to 
start some development on my iMac, so I think I will catch the discussion some 
time later!) and I am comming with a fully managed environment which is 
something else even if the managed environment has a GC, too. But the point in 
my eyes is, to simplify development and make it more secure.

That is just my small view and I hope it was a little helpfull. Don't be mad at 
me, if I got you or the discussion wrong. And hopefully you will read some more 
from me in the future here. Will take the printed PDFs MemoryMgmt.pdf, 
GarbageCollection.pdf and ObjCRuntimeRef.pdf from the printer now to read them 
in the train next.

With kind regards,

Konrad Neitzel


_______________________________________________

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