Mega Gold, Gold, Silver, and Chapter 13 in Swift


Please let me know how I can make things better!

Here’s a link to my project:


I’m tring to implement the same kind of code in Swift ,runnig through Chapter 14 (Debugging Tools part) and found out that it has a problem.
When you draw some lines and double tap to delete all the lines, not like the code in Objective-C, the memory is not deallocated.
I sure have set weak references to the lines but no success.
I checked with Allocations instrument and found this out with my code, and it seems your code in github have the same problem.
Any solutions?