[swift-users] String view leaking

James Campbell james at supmenow.com
Wed Jan 13 12:25:29 CST 2016


A String is a Struct in Swift, so I believe it should be a copy.

*___________________________________*

*James⎥Lead Engineer*

*james at supmenow.com <james at supmenow.com>⎥supmenow.com <http://supmenow.com>*

*Sup*

*Runway East *

*10 Finsbury Square*

*London*

* EC2A 1AF *

On Wed, Jan 13, 2016 at 6:23 PM, Alexandre Lopoukhine via swift-users <
swift-users at swift.org> wrote:

> Hello everyone,
>
> I have a quick question that I haven’t found an answer to online. Do
> String.CharacterView, String.UTF8View, String.UTF16View or
> String.UnicodeView leak the original string? If I store lots of subranges
> of these, without keeping references to the original, will the originals
> remain in memory?
>
> Thanks for your help.
>
> Yours,
>
> Sasha
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160113/1d6ddc9c/attachment.html>


More information about the swift-users mailing list