The previous implementation relied on manual object instantiation which increases the risk of memory leaks and pointer mismanagement.
Replaced raw pointers with std::unique_ptr for Scanner and Logger objects.
Implemented RAII (Resource Acquisition Is Initialization) to ensure automatic cleanup when objects go out of scope.
Decoupled the Logger from the Start class via constructor injection for better testability.
The previous implementation relied on manual object instantiation which increases the risk of memory leaks and pointer mismanagement.
Replaced raw pointers with std::unique_ptr for Scanner and Logger objects.
Implemented RAII (Resource Acquisition Is Initialization) to ensure automatic cleanup when objects go out of scope.
Decoupled the Logger from the Start class via constructor injection for better testability.