RosettaCodeData/Task/Memory-allocation/C++/memory-allocation-2.cpp

6 lines
133 B
C++

int main()
{
void* memory = operator new(20); // allocate 20 bytes of memory
operator delete(memory); // deallocate it
}