teamcfadvance / cfstatic

CfStatic is a framework for managing the inclusion and packaging of CSS and JavaScript in CFML applications.
https://teamcfadvance.github.io/cfstatic
MIT License
102 stars 35 forks source link

Orphan File Handle on win7/CF9.0.2 #76

Closed jbriccetti closed 11 years ago

jbriccetti commented 11 years ago

Once i run code that creates and calls the init method of cfstatic (and the code all works appropriately) I can not move or delete the org folder in windows explorer - i get the error message: "action cannot be completed because the file is open in another program"

Once i restart ColdFusion (if i don't run the code again) i can move the folder. once i run the code it gets locked again. it seems to me a close() must not be getting called on a file.

I haven't sifted through the code yet to try to understand why, but I did want to get a ticket in

DominicWatson commented 11 years ago

Thanks for that. Hopefully I'll be able to create a test case. I wonder though if it is to do with the jar files and JavaLoader which is loaded into the server scope.

jbriccetti commented 11 years ago

Dominic - so i quickly scanned through your code and replaced all references to the server scope and replaces them with the request scope - it ran fine, but i still had the same problem - once i ran a single request that called the component, i could no longer rename the folder int he webroot. next thing i will do is try to figure out exactly which file(s) it's fussing about cheers jon

DominicWatson commented 11 years ago

I just reproduced and got a slightly more informative message:

cannot delete file

Looks to me to be JavaLoader generated class files perhaps (or the Jars in general).

Is deleting this folder something that want to be able to do after compiling the code? Or is it just an observation?

DominicWatson commented 11 years ago

Closing this. Please re-open if still believe it needs addressing in CfStatic.