Skip to content

methods created when creating new object should be in prototype chain not in object itself #16

@sk16

Description

@sk16

methods created when creating new object should be in prototype chain not in object itself.

Since functions/method itself an object , it memory for it , when creating a object.

var que = new buckets.Queue();

que object is created , and method like enqueue and dequeue is also created in object itself , not in prototype chain.

If I create a hundreds of object like this. It will take a lot of memory .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions