EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Clean the CBFS FileHandleContext.Target

Posted: 10/01/2012 05:47:50
by ttran Tran (Priority Standard support level)
Joined: 08/20/2012
Posts: 35

I put a file structure in the CBFS, and , for example in callback CbFsCloseFile()
I can get this structure out like this:

RSEntry myEntry = (RSEntry)GCHandle.FromIntPtr(FileHandleContext).Target;

and myEntry is also a part of a folder data structure, which is handdled outside of CBFS.

OK, by a specific reason, I would like to remove this myEntry out of the folder data structure. However, (RSEntry)GCHandle.FromIntPtr(FileHandleContext).Target still points to it. How can I make the (RSEntry)GCHandle.FromIntPtr(FileHandleContext).Target not to point to myEntry anymore (by a command outside of CBFS) ? so that myEntry can COMPLETELY disappear by Garbage Collector.
Or are there another suggestion in this case ?

Posted: 10/01/2012 06:38:34
by Vladimir Cherniga (Team)

if you talk about CbFs version 3 then use FileInfo.SetHandleContext(NULL)
Posted: 10/15/2012 02:40:09
by Vladimir Cherniga (Team)

This is no need in CBFS4.



Topic viewed 872 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!