On Thu, 2004-07-01 at 09:11, Harshwardhan Nagaonkar wrote: > Michael Halcrow wrote: > > On Thu, Jul 01, 2004 at 08:27:49AM -0600, Chris Alvarez wrote: > <snip/> > > > > Now if you'll excuse me, I have to get back to the hell that is manual > > memory management in C in the Linux kernel VFS layer... > > The dark language of memory allocation is not to be spoken here, so I > shall say nothing of C/C++ manual garbage collection :) > > [/me still traumatized by CS240 where we were made to reinvent the wheel > of memory allocation]
If you do C++ correctly, then you rarely need to worry about memory allocation problems or garbage collection. C++ was designed with one nice principle that is perhaps its redeeming feature: guaranteed destruction semantics. This is something Java and C# (and C++.NET) have both eliminated to their detriment. Simply put, as soon as a C++ object goes out of scope, you are guaranteed that its destructor will be called (now, not 5 minutes from now). Therefore if you are not lazy and just do simple cleanups in your destructors you'll be fine most of the time. There are situations where memory management does become a pain. I rarely have problems with memory leaks or management in C++. And I can code about as fast as any java coder. CS240 problems I blaim squarely on the programmer assuming that the Java way of doing things is always the right way. I don't much care about ML. I know it's intellectually more appealing, but I'm not really an intellectual. Michael -- Michael L Torrie <[EMAIL PROTECTED]> ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
