Memory leak bug
See original GitHub issueThe following code causes a memory leak on Linux:
using (var connection = new MySqlConnection(_connectionString))
{
await connection.OpenAsync();
using (var transaction = connection.BeginTransaction())
using (var command = new MySqlCommand(connection, transaction))
{
command.CommandText = "SOMESQL";
command.ExecuteNonQuery();
command.CommandText = "SOME OTHER SQL";
command.ExecuteScalar();
transaction.Commit();
}
}
I couldn’t investigate it further, but lldb with the SOS plugin shows System.String containing the queries accumulating in the heap.
Please let me know if you would like some more details.
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (9 by maintainers)
Top Results From Across the Web
Memory leak
In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in...
Read more >What is Memory Leak? How can we avoid?
Memory leak occurs when programmers create a memory in a heap and forget to delete it. The consequence of the memory leak is...
Read more >What Is a Memory Leak and How Do They Happen?
A memory leak is a portion of an application that uses memory from RAM without finally freeing it. The result is that an...
Read more >Memory leak
Memory is allocated but never freed. Memory leaks have two common and sometimes overlapping causes: Error conditions and other exceptional circumstances.
Read more >Three kinds of memory leaks - Made of Bugs - Nelson Elhage
Type (1): Unreachable allocations ︎. This is the classic C/C++ memory leak. Someone allocated memory with new or malloc , and never called ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I opened #275 to track SslStream not being disposed.
Apologise if I wasn’t able to cut some time to test, I will send some updates if we get back to it.