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 on sending byte array #119

Open
Grimones opened this issue Dec 21, 2017 · 0 comments
Open

Memory leak on sending byte array #119

Grimones opened this issue Dec 21, 2017 · 0 comments

Comments

@Grimones
Copy link

Grimones commented Dec 21, 2017

I'm trying to send a byte array which contains depth frame of kinect v2.
I'm sure, that memory leak isn't caused by the way how i'm working with byte array because before i was using SocketIoClientDotNet and ram usage was not exceeding even 100MB and GC was working constantly. After i have changed to WebSocket4Net i'm experiencing the issue.
GIF
On 247MB i have turned off sending and then resumed again. And you can see that interval between GC increases from the start.
Depth frame size is 512*424*2 (2 bytes per pixel) = 434176. Also i have depth frame quiality which simply ingnores every nth pixels. So the memory leak also appears even on capturing evey 8 pixel, 434176 / 8 = 54272. But much slower than on full frame.

GC starts to work after exceeding 600mb.
GIF.
However memory usage constantly increases.
Code is pretty simple.

private void Send(byte[] data)
        {
            _webSocket.Send(data, 0, data.Length);
        }

Using latest version of WebSocket4Net - 0.15.1
SuperSocket.ClientEngine.Core - 0.9.0

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