Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
remove HTTPClientResponse destructor #273
It allocates memory, regardless of if the user has correctly called
Here's a debugger backtrace:
The problem is that I didn't come up with a proper solution for this. Just removing the finalizer will possibly leave the connection in a bad state and can cause corrupted protocol talk or, in the best case, a timeout error on the other side of the connection. That's why I wanted to at least have an assertion. But since assert() also allocates when it triggers, it also doesn't help. Maybe using
That GC really needs to get properly fixed. It's just too easy to accidentially trigger something GC related (possibly indirectly because a class contains a reference counted field) and this restriction completely precludes a lot of useful or important use cases.