Re:Rust and C++ Interoperability in Chrome
by Matthias247 on Wednesday August 19, 2020 @04:13PM
(#24215698)
Do you mean references instead of pointers? I'm not familiar of a difference between pointers and raw pointers in C or C++.
C++ allows to be more clear: unique_ptrs allow to move ownership, references mean this is definitely not owned, and the remaining questions are around normal pointers.
With pure C there is however zero distinction. A pointer can mean ownership is transferred, it is meant to be a reference, it could be a static reference to something in constant memory, etc.
C++ allows to be more clear: unique_ptrs allow to move ownership, references mean this is definitely not owned, and the remaining questions are around normal pointers.
With pure C there is however zero distinction. A pointer can mean ownership is transferred, it is meant to be a reference, it could be a static reference to something in constant memory, etc.