[swift-evolution] What about garbage collection?
gparker at apple.com
Tue Feb 9 18:53:13 CST 2016
> On Feb 8, 2016, at 1:00 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
> We have discussed in the passed using hybrid approaches like introducing a cycle collector, which runs less frequently than a GC would. The problem with this is that if you introduce a cycle collector, code will start depending on it. In time you end up with some libraries/packages that works without GC, and others that leak without it (the D community has relevant experience here). As such, we have come to think that adding a cycle collector would be bad for the Swift community in the large.
A cycle collector also requires that retaining storage and non-retaining storage be distinguishable. This would be possible in a pure-Swift environment with sufficient extra metadata, but is not in Objective-C. Any cycle that included an Objective-C object would not be detectable.
Greg Parker gparker at apple.com <mailto:gparker at apple.com> Runtime Wrangler
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution