3 ms·
Plain (automatic) reference counting can not handle cycles without support from developers.
by danbruc 12y ago
Plain (automatic) reference counting can not handle cycles without support from developers.
- blub 12y agoI find that a good thing, because developers are trained to think that they have to use weak references and think about object lifetimes. Android developers tend to not think so much about lifetimes which leads to memory leaks because Dalvik apparently can't figure out some of those cycles by itself. Just do a search for "Android memory leak" to see some examples.
- smrtinsert 12y agoA platform with 80% of mobile installations has developers who don't understand object lifecycles Got it.
- kasabali 12y agoI guess he meant Android application developers, not the people who wrote Dalvik.
- tomjen3 12y agoTry to parse any tree structure without creating cycles (say the XML/XHTML inside an ebook) - that may be possibly with just one or two devs on the project but as soon as every dev doesn't know every line of code there is an oppertunity for errors and you only need one link to leak memory. That Dalvik can't handle the cycles is stupid but an issue with Dalvik (that is likely to be phased out with the new runtime) not an issue with GC. Computers are really, really, good about executing trivial tasks repeatedly without ever making a stupid mistake, humans not so. And as Terminator taught us: never send a human to do a machines job.