开发者

General graph directory structure needs garbage collection?

I can't think of an example where the reference count of a file may not be zero even when it is no longer possible to refer a directory or file.

The only example that I开发者_Python百科 could find for a general graph directory structure is this:

General graph directory structure needs garbage collection?

(Node 1 would be the north node, Node 2 would be the node Node 1 is pointing too, and so on and so forth)

If I wanted to delete Node 1, it should be okay since there is only one reference to it (Node 8).

So my question would be: Could anyone give me an example where the reference count is not zero even if it is no longer possible to refer to that file/directory?

This is for a presentation that I would be presenting tomorrow for class. I tried searching for an answer on the net but they all just say the same thing without giving a concrete example. Or maybe I'm just dumb. :)


You're almost there. Suppose you have a whole complicated tree structure connected to your ring, and then you delete the link to your ring. What would happen to the file reference counts?

(The answer does depend somewhat on how reference counts are maintained.)


What happens when a directory contains a folder that inside has link to the root directory itself?

something like:

DIR1 <------------------+
  +--- files            |
  +--- DIR2             |
         +---files      |
         +---DIR1 ------+

Suppose to want to remove (outer) DIR1 from the folder that contains it..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜