Re: [xml] setting URL for xmlRelaxNGParserCtxt?

Kasimier Buchcik wrote:

Martijn Faassen wrote:

Dictionaries won't grow indefinitely if I throw away nodes once every while, right? The refcount will go down of dictionary values, to 0 if it's a unique string, and the thing (tag name? text node value?) will go away.

As far as I can see in the code, the dictionary entries are not
reference-counted; only the dictionaries itself are reference-counted.
So if you put a string in, it won't be freed until the dictionary itself
is freed.

Ah, right, now that you say so I realize that's of course true. I've written code reference counting dicts myself. Hmm. I've been spoiled too much by Python. :)

Now understand that there are "ID"s which are potentially random strings, and will grow my dictionary. Will those IDs never be removed because they're not dereffed when a document goes away? Are these XML
They won't be removed since there is no dereferring machanism.

So what *is* stored in these dictionaries? I still don't know. Tagnames? Namespace strings? Text node content? IDs? All of them? I guess I'll have to study the source to get the answer. :)

If one blows away a dictionary once every while, what happens to the things referencing things inside it?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]