URLConnection memory leak

Executing the following code introduces a memory leak when you do this:

First create a class WebTest as URLConnection
Add the ContentReceived and Error events.
In both events add


Then execute this code several times.

var test as new WebTest
test.Send("GET", "https://www.google.com",5)

After about 50 times you get a memory leak for about 200MB.

Any thoughts?

BTW on macOS. Not sure if this is also the case on Windows.

does it happens also if you remark self.Disconnect?

can you make a case with a sample project, just to make sure this is a leak ?
We can simply run tests also.

Note that the docs already say:

A disconnected socket is not set to Nil, but is no longer in a useful state. You should create a new socket rather than attempting to re-use a disconnected socket.