In Swift, when working with objects, it's important to manage memory correctly. One way to do this is by using weak references to avoid retaining objects too long and causing memory leaks. In this article, we will discuss how to create an array of weak references in Swift using a generic wrapper.
var weaky: [Weak<Stuff>] =
[Weak(value: Stuff()), Weak(value: Stuff())]
здесь разве сразу же не высвободится память? Есть только слабая ссылка внутри класса Weak на Stuff