@_RustyRooster
Magdalena
5 months
This is a friendly reminder to C/C++ developers that if you don’t free the memory you allocate, it will deplete and then you have to buy another RAM
27
13
113

Replies

@_brym
steve
5 months
@_RustyRooster But only if there's enough room inside your computer to hold more rams ⚠️
1
0
0
@_RustyRooster
Magdalena
5 months
@_brym No, you can throw the fully allocated RAM away, it’s wasted
1
0
6
@OliverRichers
Oliver Richers
5 months
@_RustyRooster For C++, there is the RAII rule - resource acquisition is initialization. This means only allocate resources in a constructor and release them in the destructor. With that C++ is even better than languages with garbage collection.
0
0
0
@NanEmAll
NanEmAll
5 months
@_RustyRooster malloc is your master 😉
0
0
0
@clovist237
Clovis T
5 months
0
0
0
@MissionEnabler
Kyle Rowland
5 months
@_RustyRooster Expert level memory management - nicely played.
0
0
1
@maumenegaz
menegaz
5 months
@_RustyRooster On embedded C, we don't malloc() 🥺 it's a sin 🇻🇦
0
0
1
@evergreengineer
Evergreen Engineer
5 months
0
0
1
@bissuusingh
B Singh 🐝
5 months
@_RustyRooster Just download more ram
1
0
10
@jdx_code
Jyotirmoy Das
5 months
@_RustyRooster Jai Sri RAM 🙏🤪
0
0
0
@crystalline_cat
Magdalena Kiesel
5 months
@_RustyRooster If physicists can assume spherical cows in a vacuum, C-developers can assume infinite RAM. Making it work in practice is then a DevOps problem that someone else has to solve.
0
0
4
@tttrrraaayyy
tray
5 months
@_RustyRooster My back yard is full of so many sheep. Pls tell me how to deallocate some of them!!
0
0
0
@jasonrickman
Jason Rickman
5 months
@_RustyRooster That's why I use the Amazon scheduled orders so I never run out of RAM
0
0
1
@NevilleAjim
Neville Ajim
5 months
@_RustyRooster 😂 Maybe that's what destroyed my last laptop
0
0
1
@chris_stura
Chris (he/him)
5 months
@_RustyRooster In C++ you can use smart pointers which will use reference counting to free memory for you.
0
0
1
@nilostolte
Nilo Stolte, PhD 🍁⚙️
5 months
@_RustyRooster This is not completely true. If you develop your own memory allocation management code, you actually never need to free memory. You can reuse the memory allocated and you can allocate memory in large chunks to save time. Malloc and new are extremely slow.
0
0
0
@iamsouvik_b
Souvik Bhattacharjee
5 months
@_RustyRooster Good warning ⚠️
0
0
1
@xamry_
Amresh
5 months
@_RustyRooster Not freeing memory in VC++ code had our summer internship demo crashed in front of audience which was otherwise working flawlessly on our machines.
0
0
2
@JarolCohnson
Debjit Karmakar
5 months
@_RustyRooster With great power comes great responsibility😆
0
0
1
@vethalik
Vethalik
5 months
@_RustyRooster False, everybody knows you can just download more ram from the play store
0
0
2