search for: free_doc

Displaying 4 results from an estimated 4 matches for "free_doc".

Did you mean: free_dev
2014 Dec 15
3
Significant memory leak when using XML on Windows
...program their own stuff for things like reading the actual memory consumed by the Rterm process etc.. If you prefer plain vanilla, though, I guess this would be it: memoryLeak <- function( x = system.file("exampleData", "mtcars.xml", package="XML"), n = 5000, free_doc = FALSE, rm_doc = FALSE, use_gc = FALSE ) { lapply(1:n, function(ii) { doc <- xmlParse(x) if (free_doc) free(doc) if (rm_doc) rm(doc) if (use_gc) gc() NULL }) } 2) If I knew my way around OSX or Linux, I would be happy to go with your suggestions - but as I'm not...
2014 Dec 15
0
Significant memory leak when using XML on Windows
...like reading the actual memory > consumed by the Rterm process etc.. If you prefer plain vanilla, though, I > guess this would be it: > > memoryLeak <- function( > x = system.file("exampleData", "mtcars.xml", package="XML"), > n = 5000, > free_doc = FALSE, > rm_doc = FALSE, > use_gc = FALSE > ) { > lapply(1:n, function(ii) { > doc <- xmlParse(x) > if (free_doc) free(doc) > if (rm_doc) rm(doc) > if (use_gc) gc() > NULL > }) > } > > 2) If I knew my way around OSX or Linux, I...
2014 Dec 11
3
Significant memory leak when using XML on Windows
Dear list, I'm sorry to keep coming back with this time and time again, but this bug is still not fixed even though the root cause of the issue has been around for 2-3 years now. And as the number of packages that depend on XML grows, I thought maybe this deserves some wider attention. I did my best to make reproduction of the issue as easy as possible:
2015 Jun 25
0
[PATCH] v2v: Free XML objects in the correct order.
...eDoc (doc); -} - static struct custom_operations doc_custom_operations = { (char *) "doc_custom_operations", - doc_finalize, + custom_finalize_default, custom_compare_default, custom_hash_default, custom_serialize_default, custom_deserialize_default }; +value +v2v_xml_free_doc (value docv) +{ + CAMLparam1 (docv); + xmlDocPtr doc = Doc_val (docv); + + xmlFreeDoc (doc); + CAMLreturn (Val_unit); +} + /* xmlXPathContextPtr type */ -#define Xpathctx_val(v) (*((xmlXPathContextPtr *)Data_custom_val(v))) +#define Xpathctx_ptr_val(v) (*((xmlXPathContextPtr *)Data_custom_val(...