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 main #9

Open
HollingsworthDan opened this issue May 22, 2020 · 4 comments
Open

Memory leak in main #9

HollingsworthDan opened this issue May 22, 2020 · 4 comments

Comments

@HollingsworthDan
Copy link

This memory leak keeps tripping my leak detection can we get this fixed?

	// Connect and start the event loop
	connectionManager->Run();

	return 0;
}


should look more like :

	// Connect and start the event loop
	connectionManager->Run();

	delete connectionManager;

	return 0;
}

Cheers

@Timac
Copy link
Contributor

Timac commented May 29, 2020

Thanks for reporting this problem. You are right that the connectionManager is not deleted. If you make a PR, we can merge it.

Since this delete is missing just before the plugin is quit, this really isn't a memory leak. I would however be interested to know which tool you are using for the leak detection. I don't see such a warning with the Clang Static Analyzer.

@HollingsworthDan
Copy link
Author

HollingsworthDan commented May 29, 2020 via email

@Timac
Copy link
Contributor

Timac commented May 29, 2020

Hey Dan,

Thanks a lot for the info. We are using several of these tools ourselves but none of them reported this potential leak. That's why I was curious about it. For example we use the Clang Static Analyzer for detecting problems at compile time. We are also using Instruments on macOS to detect leaks at runtime. I assume that your solution would be fairly similar to Instruments.

@HollingsworthDan
Copy link
Author

HollingsworthDan commented May 29, 2020 via email

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

2 participants