Memory Leak/Management Issue with SSM?

Sep 21, 2010 at 2:52 AM

Hello,

First of all, thanks for making this library "free".

I need to create a number of SimpleStateMachine (1000+) instances in my application and then delete those.

Even though I de-reference the SimpleStateMachine instances, the StateMachineDSLEngine objects do not get garbage collected. There are exactly as many of them as StateMachines was created before. Among others, the size of a  Dictionary <Type DslEngine> is also increasing...

Any hints what goes wrong?

Regards,
Zsolt

Coordinator
Sep 21, 2010 at 3:30 AM
PGh0bWw+PGJvZHkgYmdjb2xvcj0iI0ZGRkZGRiI+PGRpdj5JJ20gc29ycnkgSSBkb24ndCBrbm93 IHdoeSB0aGF0IHdvdWxkIGJlLiBZb3UgbWlnaHQgc2VlIGlmIG9iamVjdHMgeW91IGFyZSB1c2lu ZyBhcmUgZGlzcG9zYWJsZS4mbmJzcDs8YnI+PGJyPlRoYW5rcyw8ZGl2PjxiciBjbGFzcz0id2Vi a2l0LWJsb2NrLXBsYWNlaG9sZGVyIj48L2Rpdj48ZGl2Pk5hdGhhbiBTdHVsdHM8L2Rpdj48L2Rp dj48ZGl2Pjxicj5PbiBTZXAgMjAsIDIwMTAsIGF0IDc6NTIgUE0sICJac29sdDIiICZsdDs8YSBo cmVmPSJtYWlsdG86bm90aWZpY2F0aW9uc0Bjb2RlcGxleC5jb20iPm5vdGlmaWNhdGlvbnNAY29k ZXBsZXguY29tPC9hPiZndDsgd3JvdGU6PGJyPjxicj48L2Rpdj48ZGl2PjxzcGFuPjwvc3Bhbj48 L2Rpdj48YmxvY2txdW90ZSB0eXBlPSJjaXRlIj48ZGl2PiA8c3R5bGU+Qm9keXtmb250LWZhbWls eTogVmVyZGFuYTsgZm9udC1zaXplOiAwLjc1ZW07fSNUaHJlYWROb3RpZmljYXRpb25Gb290ZXJ7 Y29sb3I6IGdyYXk7IGJvcmRlci10b3A6IDFweCBzb2xpZCAjY2NjO30jVGhyZWFkTm90aWZpY2F0 aW9uUG9zdEJvZHl7TWFyZ2luLUJvdHRvbTogMmVtO308L3N0eWxlPjxwPk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