문제

I am parsing an RDF_model using librdf_parser_parse_string_into_model. I then retain the librdf_model but free the librdf_parser. It looks to me as if the nodes in the model then have disappeared as well.

So what lifetime does Redland RDF impose on librdf_nodes in this case? Is the the lifetime of the model that contains them (as would seem most convenient) or the lifetime of the parser that created them (as now may be the case)? The documentation seems to be silent on this.

도움이 되었습니까?

해결책

Redland nodes librdf_node are implemented as Raptor terms raptor_term. These are reference counted but not cached in any other way, so are free()-d when they are no longer referenced. Similarly librdf_uri are raptor_uri and work the same way.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top