Date: Sun, 24 Aug 2025 20:27:37 +0100
>> Anyone who is able to check their pointers before use, is equally able>> to assign 0 to deleted pointers.> > {> T* p = new T;> Dll_fn_takes_by_Copy (p);> delete p;> }> > Show me how.> > Now you are being silly.😂 ...no seriously...it is a honest question. How can check if Dll_fn_takes_by_Copy assigned nullptr to the copy of p?> > But library implemented and low level will definitely use raw > pointers....just show me how many std::vector implementation uses smart > pointers for its internal data pointer.> How standard library implementations are written is totally irrelevant.Very relevant...stl implementation are the goto to anyone who wants to crank up his level of C++ expertise. Most students i see, copy the standard implementation, even if they have the tools to do better.
Received on 2025-08-24 19:27:43