Be more specific with your question:
Java: deallocation is always automatic
C++: objects allocated with new have to be released with delete
To instantiate a object, we use the new keyword in Java, which creates an object in memory.
New and delete are akin to malloc and free, respectively, in C. Although both malloc and free are still available in C++ (for backward compatibility and interoperability with C-style code), the new and delete operators are much simpler to use because the allocation and deallocation of all dynamic memory consumed by an object is handled by the object's own constructors and destructors. Thus there is no need to calculate how much memory to allocate; the new operator can work that out all by itself, based upon the class of object being instantiated, and the object itself can allocate/deallocate any additional dynamic memory as and when it actually requires it. This mechanism of construction/destruction allows highly complex dynamic objects and object hierarchies to be instantiated at will with just a single call to the new operator. Each object takes care of itself (as do all embedded objects and/or base classes of the object), thus all the programmer has to do is instantiate and delete an object as and when required.
congugative memory allocation ,is use to array
A set function (or setter) is an object mutator. You use it to modify a property of an object such that the object's invariant is maintained. If the object has no invariant, a setter is not required. A get function (or getter) is an object accessor. You use it to obtain a property from an object such that the object's invariant is maintained. If the object has no invariant, you do not need a getter.
Declaration of the object involves only creating the reference variable to the object. Example: class SampleClass{ } Object Declaration: SampleClass obj1; Object Creation: Creating an object involves use of new keyword and actually allocating memory for that object. SampleClass obj2 = new SampleClass ();
Delete keyword
To instantiate a object, we use the new keyword in Java, which creates an object in memory.
I think you're referring to the C/C++ concept of "dangling pointers." This is when you allocate some memory to a pointer, then deallocate that memory, but don't change the pointer. This causes any attempted use of the pointer to return an unused memory address. There is no such concept in Java, since the programmer has little to no control over how memory is allocated or freed. The closest thing I can think of is if you're using a class such as a Reader, in which you can close the object (Reader.close()) and then still have a reference to it. But in this case (and other similar cases) attempting to use the Reader further will result in an IOException being thrown.
New and delete are akin to malloc and free, respectively, in C. Although both malloc and free are still available in C++ (for backward compatibility and interoperability with C-style code), the new and delete operators are much simpler to use because the allocation and deallocation of all dynamic memory consumed by an object is handled by the object's own constructors and destructors. Thus there is no need to calculate how much memory to allocate; the new operator can work that out all by itself, based upon the class of object being instantiated, and the object itself can allocate/deallocate any additional dynamic memory as and when it actually requires it. This mechanism of construction/destruction allows highly complex dynamic objects and object hierarchies to be instantiated at will with just a single call to the new operator. Each object takes care of itself (as do all embedded objects and/or base classes of the object), thus all the programmer has to do is instantiate and delete an object as and when required.
You can use it for virtual memory,but you need memory still.
No the memory is built in but you need a sim card
No you need the memory card
The SONY PSP doesn't necessarily need a Memory Card to function. And by function i mean to play a game or use the Internet but up to now SONY PSP's are sold with no internal memory which means if you want to have Pictures, Videos, Music, and save game data you need to have a memory card. So basically you need the memory card if you want to use the PSP to its intended use.
No need to use usb flash memory to download quick books.
The driver software will need to be installed to use your memory card software.
The only memory cards you wouldn't need a reader for are ones you would never need to connect to a computer. By definition, memory cards need a reader to be connected to a computer.
I Need Help on This One