Answer to Question #538 in C++ for anna-molly

Question #538
Can I use new/delete and malloc/free in one program?
Expert's answer
It is possible, but to free the memory that was allocated by operator new you have to use operator delete, and for the memory allocated by malloc – operator free. You should not mix them – it may lead to the crash of the program. The reason is that allocating the memory operator new leaves special marks for the allocated block which are then used for its release.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


Assignment Expert
27.01.14, 15:48

Dear customer,
Please contact our support department via
or use live chat on this website.

Assignment Expert
16.01.14, 16:30

Asking questions is free and huge number of answers is published for free. If your question will require a lot of work and cannot be done for free, you will be informed.

14.01.14, 00:54

how can you delete your account on here?

14.01.14, 00:54

Do you pay for asking a question?

Leave a comment

Ask Your question

New on Blog