Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak in class BlockingCircularStream #26

Open
MartinStokelj opened this issue Jul 22, 2020 · 0 comments
Open

Memory leak in class BlockingCircularStream #26

MartinStokelj opened this issue Jul 22, 2020 · 0 comments

Comments

@MartinStokelj
Copy link

I use create and dispose mavlink every 15 seconds if there is no connection to drone.
I think that there is memory leak in class BlockingCircularStream with the mBuffer since he do not get disposed.

public MavLinkAsyncWalker()
{
	mProcessStream = new BlockingCircularStream(DefaultCircularBufferSize);

	ThreadPool.QueueUserWorkItem(new WaitCallback(PacketProcessingWorker));
}

public class BlockingCircularStream : Stream
{
	private byte[] mBuffer;

	public BlockingCircularStream(int bufferCapacity)
	{
		mCapacity = bufferCapacity;
		mBuffer = new byte[bufferCapacity];
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant