Why is Unity skyrocketing its memory usage?

I am using Unity 5.0.3 on a desktop with 8 GB of RAM. I started with 5.2.1 and kept moving downward.
I am developing a proof of concept plugin. The plugin is written in C#, in Mono for whatever version of Unity is installed. All the plugin does right now is open a server socket and accept a connection. The connection just puts the floats it receives into a Queue. The game is the Roll a Ball tutorial. The floats (randomly generated by the client to the server socket, are the SPEED in the game. The plugin is started at scene start(). And
after the Thread is spawned, the plugin is called called in the fixed_update(). The call is a DeQueue()
on the Queue used in the plugin. It returns (is supposed to) a float, which is then directly assigned
to the SPEED variable.
Ok, that is the base. Now the problem: Once I press play, and run through the test the first time,
it will work. But, once I stop the scene and try to go back to developing, the memory usage will
climb until the HDD is paging constantly. It won’t allow using the close window option, or respond
at all. Task manager has to be used to kill it. I have tried: cleaning all, rebuild all, both with and
without Unity up, removing the installation entirely and reinstalling, and even currently have every
shadow in the game turned off. I don’t know if it related, but the Unity I was using to start ( 5.2.1 )
would only get 5 out the hundreds of floats sent. But it would get some. After the problem started,
it would not receive any. Version 5.0.3 is the first version that started receiving any floats at all. But again, only about the first 5 or 6 out of hundreds. And once it stops, it doesn’t get anymore.
I am very new to Unity, so other than those general troubleshooting steps listed above, I don’t have
Unity expertise to go any further without some help. Thank you in advance.

The answer is quite simple: Your plugin design is horrible ^^. You never terminate your thread, so it will keep running even in edit mode since Unity only has one Mono environment. Threads aren’t terminated automatically, only when the appdomain is actually unloaded (when you exit Unity).

Next thing is you use a TCP connection. It’s based on a stream, not on messages. That means it’s possible that you receive 2 floats at once or only a “half float”. This could give you additional problems.

You also don’t have any synchronisation / locking between the two threads. This could result in random errors as well.