3 ms·
Being a programmer who has written memory managers in C++ as well as used garbage collected languages quite a bit like Java, I think the solution will just even
by jhspaybar 15y ago
Being a programmer who has written memory managers in C++ as well as used garbage collected languages quite a bit like Java, I think the solution will just eventually be better VMs. Having watched the progression of Java from the 90s to now, it seems obvious to me that these are the sorts of problems that will be solved by the folks who put together VMs.
- wsc981 15y agoDo we really need garbage collected languages when technology like Objective-C's ARC transparently "automates" the use of manual memory management? See: http://clang.llvm.org/docs/AutomaticReferenceCounting.html http://clang.llvm.org/docs/AutomaticReferenceCounting.html
- ryanpetrich 15y agoARC is pretty slow in the presence of multiple CPUs as it's still reference counting underneath the hood (which requires atomic increment/decrement). Garbage collection and other forms of manual memory management have the potential to do much better.
- kmontrose 15y agoARC also requires you explicitly break cycles, and has additional "thinking overhead" (strong/weak on properties, no pointers in structs, and some void* magic iirc. It's certainly better than pure manual memory management, but it's not as painless (in terms of freeing a programmer from thinking about memory allocation) as a proper GC.
- soc88 15y agoYes. Just because it comes from Apple doesn't mean it has magic dust in it which makes broken stuff work. There is a reason no one is doing it except Apple. Apple choose ARC over GC because they never managed to get their GC to work reasonably well, not because ARC is better.
- mikeash 15y agoARC is a great alternative to memory management, but a poor alternative to garbage collection. It's still far too easy to leak objects by creating cycles under ARC.