Pass MainFunctionParams as a unique_ptr and have its members no longer be raw pointers |
||
Issue descriptionCurrently the MainFunctionParams (main_function_params.h) are passed as raw pointer but ideally should be unique_ptrs. Therefore, the ownership of its members can be passed with the MainFunctionParams. File this bug to track progress.
,
Jul 10
Agreed we should make the struct move-only (by deleting the copy constructor). A few members might need to use unique_ptrs but that shouldn't be all (e g. Closure is also moveable)
,
Jul 10
If using move, we potentially need to refactor any newly added member in the MainFunctionParams in the future, while unique_ptr doesn't requires that. Is there any particular reason to use move?
,
Jul 10
unique_ptr requires assigning on the heap which is unfortunate.
,
Jul 10
New members can uniquely decide to use unique_ptr of hard to move but at least it's an individual choice.
,
Jul 10
I see, thanks!
,
Jan 11
Available, but no owner or component? Please find a component, as no one will ever find this without one. |
||
►
Sign in to add a comment |
||
Comment 1 by sky@chromium.org
, Jul 10