| Bug #55793 | MySqlSessionStateStore , EventLog should be Disposed() | ||
|---|---|---|---|
| Submitted: | 6 Aug 2010 0:11 | Modified: | 13 Aug 2010 10:52 |
| Reporter: | Nils Selåsdal | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / NET | Severity: | S3 (Non-critical) |
| Version: | 6.2 | OS: | Any |
| Assigned to: | Vladislav Vaintroub | CPU Architecture: | Any |
[6 Aug 2010 10:30]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/115174 840 Vladislav Vaintroub 2010-08-06 Bug#55793: dispose EventLog in SessionState provider
[6 Aug 2010 11:02]
Vladislav Vaintroub
pushed to 6.0.5, 6.1.3, 6.2.4, 6.3.4
[13 Aug 2010 10:52]
Tony Bedford
An entry has been added to the 6.0.5, 6.1.3, 6.2.4, and 6.3.4 changelogs: EventLog was not disposed in the SessionState provider.

Description: MySqlSessionStateStore instantiates an EventLog 2 places. The EventLog inherits from Component, and takes some some cleanup actions in its .Dispose(bool) method, investigated with Reflector. The Connector/NET should cleanly Dispose of the EventLog as to not waste resources. How to repeat: Memory orofiling an app utilizing Mysql.web.dll that triggers writing to the event log shows unnecesary handles sticking around for a while - possibly due to an undisposed EventLog instance. Suggested fix: Wrap each use of EventLog log = new EventLog() in a using(EventLog log = new EventLog()) {...} block in SessionProvider.cs ( and possibly other places within the Mysql.Web assembly