Avoiding memory leaks in C

0 votes
I'm looking for some general tips on making sure that I don't leak memory in my C++ codes. Like which dynamically allocated memory should get free when and other best practices regarding the same?
Nov 5, 2018 in Others by Bharani
• 4,660 points
1,531 views

1 answer to this question.

0 votes
If you use smart pointers at all places where it could be applicable, you wouldn't have to worry about managing memory manually. Plus, smart pointers are now available as a C++ standard version called C++11.
answered Nov 5, 2018 by nirvana
• 3,130 points

Related Questions In Others

0 votes
1 answer

Easiest way to convert int to string in C++

The C++11 version has introduced the std::stoi ...READ MORE

answered Feb 10, 2022 in Others by Rahul
• 9,680 points
538 views
0 votes
1 answer

Convert char to int in C and C++

In order to read the value as ...READ MORE

answered Feb 17, 2022 in Others by Aditya
• 7,680 points
3,712 views
0 votes
0 answers

How do I determine the size of my array in C?

How do I determine the size of ...READ MORE

May 1, 2022 in Others by Kichu
• 19,040 points
495 views
0 votes
0 answers

What exactly is \r in C language?

This the code: #include <stdio.h> int main() { int ...READ MORE

May 9, 2022 in Others by Kichu
• 19,040 points
477 views
0 votes
0 answers

What is the best way to use a HashMap in C++?

Can someone recommend me some good documentation ...READ MORE

May 19, 2022 in Others by Kichu
• 19,040 points
472 views
0 votes
1 answer

setuptools: build shared libary from C++ code, then build Cython wrapper linked to shared libary

There is a seemingly undocumented feature of setup that ...READ MORE

answered Sep 11, 2018 in Python by Priyaj
• 58,020 points
701 views
0 votes
1 answer

Python : Short Integers

Firstly, if you're doing any sort of ...READ MORE

answered Sep 18, 2018 in IoT (Internet of Things) by Annie97
• 2,160 points
2,580 views
0 votes
1 answer

setuptools: build shared libary from C++ code, then build Cython wrapper linked to shared libary

There is a seemingly undocumented feature of setup that ...READ MORE

answered Sep 21, 2018 in Python by Priyaj
• 58,020 points
2,422 views
0 votes
1 answer

How to pass large records to map/reduce tasks?

Hadoop is not designed for records about ...READ MORE

answered Sep 25, 2018 in Big Data Hadoop by Frankie
• 9,830 points
1,461 views
0 votes
1 answer

Events & Threading in Windows Forms

I don't think you should be updating ...READ MORE

answered Nov 10, 2018 in Others by nirvana
• 3,130 points
1,092 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP