Page 1 of 1

COM+ keeps file handles locked after work is done

Posted: 2011-05-14T10:05:27-07:00
by ecosky
I'm using the COM+ component in C# as documented in this post http://blog.boundingboxgames.com/2011/0 ... s-xna.html to create temporary files in a game asset pipeline which are read back in after processing.

Unfortunately it appears the COM+ object keeps the file handle open until the COM+ object is finalized. This makes it impossible to use it to repeatedly to generate a temporary file that is read back in by the tool and then deleted.

Ideally the COM+ object would release file handles immediately upon completing work, or if that's not possible for some reason, provide an explicit Dispose interface to allow the caller to trigger the cleanup as needed.

Thanks

Re: COM+ keeps file handles locked after work is done

Posted: 2011-05-14T10:47:15-07:00
by magick
COM+ is a contributed project. We're primarily Linux developers and depend on the community to diagnose, repair, and enhance the COM+ project. Hopefully a user with knowledge of COM+ can help you with the file release problem.

Re: COM+ keeps file handles locked after work is done

Posted: 2011-07-10T21:59:51-07:00
by ecosky
Bit late on the follow up, sorry about that.

Thanks for the response. I have been using the COM+ for a while but finally switched to just starting the executable directly in order to avoid this file lock problem. I tried for a while to discover where the folks working on the COM+ module hung out, never found anything anywhere - from what I can tell it seems to be abandoned. Or perhaps my google-fu is weak today. Anyway, I figured I'd post that here just in case someone else was looking for support on the COM+ usage. I was going to try to fix the bug myself, but when I downloaded the IM source I didn't see anything in there for the COM+ object and I haven't been able to find out where the source comes from in order to fix it. No big deal, the exe does the trick well enough, the COM+ was just a convenience. Probably more trouble than it's worth, to be honest..

IM is pretty slick & I plan to continue to use it as a straight exe so thanks again for your ongoing efforts with this utility!