Comments (5)
Hey! Thank you for your care!
DispatchQueue
s does not cause retain cycles, they dispose passed closure after calling them, meaning they do not retain reference to the closure passed.
To be honest, the library needs a total rewrite.
from http.swift.
Hi — thanks for your explanation. So if I can't blame my leak on your code I will have to fix mine lol
from http.swift.
Oh man. Over time my code potentially opens and closes quite a few Server
s, one after the other, and they were retaining just because I forgot to call .stop()
on them when I was finished with each instance 🤪 Spent such a long time searching for the cause of this leak!
Interesting, I suppose, that the Server
instances appear to self-retain until stopped, but it's kinda obvious when I think about it. Anyway, definitely my fault in the end!
from http.swift.
Lol. Yeah they will retain until stopped because of missing [weak self] in the queue closure that you wanted to add. I think it would be better to do it. Would you like to send a quick PR for that?
from http.swift.
Sure, doing now :)
from http.swift.
Related Issues (19)
- Add support for Linux and macOS
- iOS13 API deprecated HOT 1
- How to make client authentication HOT 2
- How do you run the app on a different Mac without the libressl installation? HOT 2
- Upgrade to swift 5 HOT 2
- Issue with api pattern HOT 3
- Cannot intercept all routes HOT 2
- Multipart Requests HOT 2
- Headers are case-sensitive HOT 2
- Run on Device HOT 5
- How to SSL? HOT 1
- how do I connnect it with a directory? HOT 1
- The server fails to serve big files!
- Carthage? HOT 5
- SSL / TLS? HOT 8
- Playing .mp4 encrypted video HOT 2
- how to set headers HOT 4
- How to use Http.Swift HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from http.swift.