Do Small Memory Leaks Matter Anymore?

后端 未结 17 797
春和景丽
春和景丽 2021-02-01 04:03

With RAM typically in the Gigabytes on all PC\'s now, should I be spending time hunting down all the small (non-growing) memory leaks that may be in my program? I\'m talking abo

17条回答
  •  清歌不尽
    2021-02-01 04:33

    While I agree that every little leak adds up, I don't agree that it's always the best business decision to fix it.

    What if you have a stateless legacy system and no coders who understand it? Now you are using it in a situation that has to scale... and it's 100X cheaper to spawn a new instance and swap them out before memory goes overboard.

    Or let's say you have a batch processing system that runs 24x7 but for which there is no real user. If it's cheaper to monitor memory and tell the system to restart itself periodically, why hunt down the leak?

    I think you should try real hard but be pragmatic about the business ramifications of the decision.

提交回复
热议问题