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

Clean JSONP callback to avoid memory leaks #13

Open
manobi opened this issue Apr 17, 2012 · 1 comment
Open

Clean JSONP callback to avoid memory leaks #13

manobi opened this issue Apr 17, 2012 · 1 comment

Comments

@manobi
Copy link
Member

manobi commented Apr 17, 2012

No description provided.

@manobi
Copy link
Member Author

manobi commented Apr 17, 2012

Assertion to include in http_request.js test case:

        it('Should remove itself to avoid memory leak', function(){
            var root = {};
            var run = false;

            var request = new HttpRequest({
                host: 'localhost',
                path: '/'
            }, function(err, response){
                expect(response).to.be.ok();
            });

            request.expose(root);
            root.callback({ok:true});
            expect(root.callback).to.not.be.ok();
        });

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