Step 4: Disconnecting From the Database

This step shows how to terminate the program by disconnecting from the database and releasing the objects previously allocated.

The simplest way to do this is to delete the IldDbms object itself. This automatically disconnects from the database and releases any objects previously allocated with this connection. This is done as follows:

delete dbms;

Conclusion

This step demonstrated the disconnection procedure. This procedure is simplified since an IldDbms instance keeps track of the objects allocated with its connection.