Message from C, C++ discussions

January 2020

— Right. But I want to know if this code has no errors or not
When I write this code in c ++
Show me a mistake

Message permanent page


One question guys:

will my program leak memory if i do not delete the allocated pointers but assign their values to nullptr after i no longer need them?

— It will leak unless it’s std::shared_ptr

— Ok here i am trying to implement 'singly linked list' and i cannot delete the pointers, i think. they are allocated inside the insertion function. in this case how can i deal with this leaking??

Message permanent page

— No one knows about these things but Russian Developers

I gained experience and knowledge of these things from them

Message permanent page

— Can somebody just guide me through? i just have couple of questions

— Why can't you delete the pointers?
In the destructor of the list just go through it and delete the items

Message permanent page

— Or if it C, make a function that will clear the list by deleting all the elements

— /report

— Reported Mizdx to admins.​​​​​​​​​​​​​​​

— Lol why

— At least he can talk so this is not a problem