Top "New-operator" questions

new is a language construct that dynamically allocates memory from free store and initialises the memory using the constructor.

What's the equivalent of new/delete of C++ in C?

What's the equivalent of new/delete of C++ in C? Or it's the same in C/C++?

c++ c new-operator delete-operator
overloading new/delete

I'm making a little memory leak finder in my program, but my way of overloading new and delete (and also …

c++ operator-overloading new-operator delete-operator
What does the 'new' keyword actually do in Java, and should I avoid creating new objects?

I signed up a few moments ago, though I've been making great use of this site since I took up …

java object constructor new-operator
Use new keyword if hiding was intended

I have the following snippet of code that's generating the "Use new keyword if hiding was intended" warning in VS2008: …

c# inheritance warnings new-operator
Use new operator to initialise an array

I want to initialise an array in the format that uses commas to separate the elements surrounded in curly braces …

c++ arrays new-operator
Strings are objects in Java, so why don't we use 'new' to create them?

We normally create objects using the new keyword, like: Object obj = new Object(); Strings are objects, yet we do not …

java string core new-operator
C++ new int[0] -- will it allocate memory?

A simple test app: cout << new int[0] << endl; outputs: 0x876c0b8 So it looks like …

c++ memory-management new-operator standards-compliance
What does "new int(100)" do?

Possible Duplicate: is this a variable or function I mistakenly used something like: int *arr = new int(100); and it passes …

c++ new-operator
How to initialize members in Go struct

I am new to Golang so allocation in it makes me insane: import "sync" type SyncMap struct { lock *sync.RWMutex …

new-operator go
Add new data into PHP JSON string

I have $data as JSON encoded data and I have this string: $new_data = "color:'red'"; that needs to be …

php json add new-operator