[redland-dev] [Redland librdf RDF API 0000565]: Does freeing a model's last statement implicitly free the model?

Mantis Bug Tracker mantis-bug-sender at librdf.org
Sun Jan 26 06:28:38 EST 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=565 
====================================================================== 
Reported By:                TipTop Labs
Assigned To:                
====================================================================== 
Project:                    Redland librdf RDF API
Issue ID:                   565
Category:                   documentation
Reproducibility:            sometimes
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-01-26 11:28
Last Modified:              2014-01-26 11:28
====================================================================== 
Summary:                    Does freeing a model's last statement implicitly
free the model?
Description: 
The attached test case sometimes (and only sometimes) fails in the call to
librdf_free_model() with "incorrect checksum for freed object - object was
probably modified after being freed". One explanation could be that
librdf_free_statement() implicitly also frees the librdf_model if its last
statement was concerned. This also seems somewhat likely because raptor terms
already/also support reference counting.

Would it be possible to clarify this in the documentation [1]. Also, is there a
way for Redland API clients to inquire reference counts for forestalling such
errors (in more complicated settings than this test case)?

[1] http://librdf.org/docs/api/redland-statement.html#librdf-free-statement

Steps to Reproduce: 
Run attached test case
1) on iOS 7
2) with current version of Redland-ObjC [2]

Notice that the test case uses Redland-ObjC only for accessing Redland libraries
on iOS 7 and does not use any Objective-C abstractions over the normal Redland
API. Hence the issue does not seem specific to iOS.

[2] https://github.com/p2/Redland-ObjC
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-01-26 11:28 TipTop Labs    New Issue                                    
2014-01-26 11:28 TipTop Labs    File Added: RedlandRdfTests.m                   

======================================================================



More information about the redland-dev mailing list