Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak #9

Open
safqwf opened this issue Jun 15, 2016 · 0 comments
Open

Memory leak #9

safqwf opened this issue Jun 15, 2016 · 0 comments

Comments

@safqwf
Copy link

safqwf commented Jun 15, 2016

Please check this snippet, the library has a memory leak.

var Xsd = require('libxml-xsd'); // v0.5.1 leaks
var schema = [
'<?xml version="1.0" encoding="ISO-8859-1" ?>',
'  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">',
'    <xs:element name="test" type="xs:string" />',
'  </xs:schema>'
].join('');
var validator = Xsd.parse(schema);

for (var i = 0; i < 10000; i++) {
        var temp = validator.validate('<test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Roman</test>');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant