3 ms·
But the factory pattern has nothing to do with memory management, it serves a different purpose; memory management is a separate concern.
by Koshkin 8y ago
But the factory pattern has nothing to do with memory management, it serves a different purpose; memory management is a separate concern.
- EpicEng 8y agoIt's an abstraction used to create objects and manage their lifetime. There is no inherent opposition to managing memory in that pattern. Also, it's been done before and it works, so what is the issue specifically (i.e. not some religious nonsense about separation of concerns)?