This only works on traditional hard drives of the spinning platter variety, which is typical for MacBook Pro, Mac Mini, and iMac models, and is the case with most external hard drives used for backups.
The Mac OS X Disk Utility app provides an ability to erase free space on traditional hard drives, which overwrites vacant disk space on the drive to prevent any potential recovery of deleted files (that is, files that have been removed traditionally, rather than through secure methods).