Q:

About constructors/destructors and new/delete operators in C++ for custom objects

Suppose I have a Linked List I created myself. It has its own destructor, which frees the memory. This Linked List does not overload new or delete.
Now, I'm trying to create an array of said linked lists (open hashing, if I understand correctly). Then I allocate the necessary memory inside the constructor of this open hashing class. The new operator being called inside the constructor is enough to correctly allocate the memory for the array, right? I'm not sure because I haven't overloaded new for the Linked List class.
Also, assuming my array of Linked Lists is called elements, could I just write "delete[] elements" in the destructor? Would that call the destructor for each element in the array and correctly free the memory?
Finally, if both my assumptions are correct (ie, I don't have to overload new and delete to use them with my custom class), what is the point of overloading such operators?

A:

Yeah you are right. A plain 
elements = new LinkedList[N];

is enough to allocate them. You can then access them 
elements[i]->push(....);

and delete them in your destructor using the way you showed:
delete[] elements;

The compiler will remember how many elements were allocated, and call the destructor for each list correctly. The point of overloading the new and delete operator is to provide custom memory allocation strategy. For example, you could preallocate memory, and then take from that pool, instead of allocating everytime again memory from the OS.
But note, you have to write a copy constructor and copy assignment operator too. Since if someone copies your hash map, the linked list has to be copied too, and not just the pointer. Or you can make the copy constructor and copy assignment operator private and don't define them, disallowing copies of your hash map:
....
private:
    MyHashMap(MyHashMap const& rhs);
    MyHashMap & operator=(MyHashMap const& rhs);
....

A:

The new operator does two things: allocating memory and calling the constructor.
The delete operator calls the destructor and then frees the memory.
Arrays created with new [] must be destroyed with delete[].
You generally don't need to overload new or delete except for performance reasons. You might have a predictable pattern of allocation/deallocation which makes a particular allocation strategy very suitable (fast or low memory use).
You may wish to have a look at this page.

