lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guidotag <>
Subject [GitHub] lucenenet pull request: Fixes in the Fsync method and in a helper ...
Date Wed, 28 Jan 2015 03:31:58 GMT
Github user guidotag commented on the pull request:
    @laimis: Sure. I found that if you set file to null before entering the using's scope
and then, inside it, change it to reference a File object, it does not dispose the resources
correctly (namely, it does not close the file we are opening). I did an isolated test to reproduce
it (constructed a dummy IDisposable object and used the using instruction in the same way),
and it also failed. I am no C# expert, so I wasn't completely sure why this happened. Nevertheless,
it is reasonable that if you change the reference of the variable inside the using's scope,
bad things could happen.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message