Added tests to detect a memory leak.
Fixed a memory leak problem caused by thread-safe collections.
Stopped using thread-safe collections on event listeners.
Merge pull request #5 from natsuki14/master

Fixed a memory leak problem caused by thread-safe collections.