Skip to content

Clean JSONP callback to avoid memory leaks #13

Open

Description

@manobi
No description provided.

Activity

  1. manobi commented on Apr 17, 2012

    @manobi
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions