\n \u003CNuxtWelcome />\n \u003C/div>\n\u003C/template>\n\n\u003Cscript setup>\nconst { counterMY } = useTest();\nconsole.log('counterMY', counterMY);\n\u003C/script>\n```\n\nTo my surprise, node js does not perform any cleaning... If you do a load test of 500 queries, there will be 500 different objects with the same key in memory.\n\nCould you add this feature to the documentation?\nOr shouldn't it be?\n\nThanks!\n\n\n\n",[3107],{"name":3024,"color":3025},32234,"useState + SSR = memory leak","2025-05-29T09:15:23Z","https://github.com/nuxt/nuxt/issues/32234",0.76802754,{"description":3114,"labels":3115,"number":3126,"owner":3027,"repository":3027,"state":3059,"title":3127,"updated_at":3128,"url":3129,"score":3130},"### Environment\r\n\r\nEvery Environment\r\n\r\n### Reproduction\r\n\r\nI really believe a reproduction is not needed but tell me otherwise and I create one.\r\n\r\n### Describe the bug\r\n\r\nRegarding `useLazyAsyncData` example: https://nuxt.com/docs/api/composables/use-lazy-async-data#example\r\n\r\n\u003Cimg width=\"809\" alt=\"image\" src=\"https://github.com/nuxt/nuxt/assets/47485736/12cb870f-c219-4642-a852-00ede0d74dc1\">\r\n\r\nWe are making a `watch` call in an async context in this example, after further investigation I found some docs in Vue 3 oficial site (https://vuejs.org/guide/essentials/watchers.html#stopping-a-watcher) that say the automatic process of stopping watchers does not work in async contexts. \r\n\r\nMy workaround for this was making a new hook called `useSafeWatch` that looks something like this:\r\n\r\n./useSafeWatch.ts\r\n```ts\r\nexport default useSafeWatch() {\r\n const watchersToBeCleaned = []\r\n onBeforeUnmount(() => {\r\n watchersToBeCleaned.forEach(stopWatcher => stopWatcher())\r\n })\r\n return {\r\n watch: (...args) => {\r\n watchersToBeCleaned.push(watch(...args))\r\n }\r\n }\r\n}\r\n```\r\n\r\n./usingTheHook.vue\r\n```js\r\n\u003Cscript setup>\r\nconst { watch } = useSafeWatch()\r\n\u003C/script>\r\n```\r\n\r\nAnother solution is making something like `unctx` and store the current context (vue instance in this case) in globalThis and window but this seems to be an upstream solution...\r\n\r\nIs this something worth implementing a PR? Computeds seem to be another issue here?\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[3116,3118,3121,3124],{"name":3049,"color":3117},"8DEF37",{"name":3119,"color":3120},"discussion","538de2",{"name":3122,"color":3123},"3.x","29bc7f",{"name":3037,"color":3125},"E84B77",23043,"Possible memory leak example in the docs could be a feature `useSafeWatch`","2024-04-03T09:49:04Z","https://github.com/nuxt/nuxt/issues/23043",0.7710916,{"labels":3132,"number":3135,"owner":3027,"repository":3027,"state":3059,"title":3136,"updated_at":3137,"url":3138,"score":3139},[3133,3134],{"name":3049,"color":3117},{"name":3122,"color":3123},11860,"Cleanup data fetching utils","2023-01-19T15:53:17Z","https://github.com/nuxt/nuxt/issues/11860",0.7735341,["Reactive",3141],{},["Set"],["ShallowReactive",3144],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fjGfMEMFRAbZA3Zu0rGpfFvnCL9vzVmz4CiH7VylFOVc":-1},"/nuxt/ui/3693"]