Closed hemendpatel closed 1 year ago
Few more points:
In my case, All class inherit base class so I can see multiple base instance exist in memory for my application.
I have created welcome1 class which is also inheriting same BaseController. below is the memory snapshot after executing below code
Thank you @aredridel. I'm checking with express and NodeJS repos
I have noticed a memory issue with express:
I have create nodejs typescript app having get method which will create an object welcome to implement my business logic. I have run node --inspect and get see that the base class instance existing in memory after api request completed.
App.ts :
basecontroll.erts
welcome.ts
I have tried to delete welcome object forcefully like
delete screen.test
but still baseclass instance existing in memory.I have tried below command but we can't do this for each class
delete screen.test.__proto__.__proto__.constructor
This is working but it just work around.
Package.json: