I stand corrected. Looks like it was pgbouncer..
Thanks
This should not be the case.The database connection has been closed before deleting it.
There should be another session (Ex: psql, query tool) which is creating this problem. So, try to close all the sessions before deleting any database from GUI.