Timeline for C++ Dependency Injection vs Memory Usage
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 28, 2018 at 15:15 | vote | accept | Milack27 | ||
Nov 24, 2017 at 13:14 | audit | First posts | |||
Nov 24, 2017 at 13:15 | |||||
Oct 30, 2017 at 15:52 | comment | added | whatsisname | @Milack27: "the memory problem remains" - you don't even have evidence a memory problem exists to begin with. | |
Oct 27, 2017 at 11:52 | history | edited | candied_orange | CC BY-SA 3.0 |
added 3 characters in body; deleted 6 characters in body; added 40 characters in body
|
Oct 27, 2017 at 8:29 | comment | added | candied_orange | @Milack27 if you can find one more power to you. Just be sure you don't have bigger problems. Indirection comes at a cost. Virtual comes at a cost. Polymorphism comes at a cost. But doing away with them also comes at a cost. Humans typically cost more than memory or CPU cycles. Choose your poison wisely. | |
Oct 27, 2017 at 2:52 | comment | added | Milack27 | Nice answer, thank you! Actually, the master/slave thing was just to ilustrate the memory problem. I understand that the slave may not need the whole master, so it would be better to depend on a specific interface, instead. Anyway, the slave still needs a reference to this interface, and the memory problem remains. That's not a big issue, I agree that this is a case of premature optimization. I'm just curious if there's an elegant way to solve this problem while keeping the advantages of DI. | |
Oct 26, 2017 at 23:20 | history | answered | candied_orange | CC BY-SA 3.0 |