News for hackers. Stuff that matters.
Re:Swift 3.0 Unsafe World by BFatts on Tuesday September 27, 2016 @10:20AM (#12589741)
There is nothing inherently wrong with garbage collection, but it does take your control away. You have to allow for a certain level of "magic" to have elements be freed. This doesn't always work so memory leaks are a bit harder to track down.

In a system where you control the allocations and deallocations, you have finer control but it's easier to forget to deallocate memory no longer in use. This is easier to track down, but a headache none the less.

Re:Swift 3.0 Unsafe World by kbsletten on Tuesday September 27, 2016 @10:26AM (#12589789)
Also, if we're talking about passing pointers to objects to C code, GC frequently moves objects in memory which will invalidate the pointer. It's not possible to reliably predict when this will happen, so you need extra language support for pinning to do any of the things in this tutorial without accessing invalid memory.