关于资源泄漏,讨论一下!
到底什么是资源泄漏?应该首先研究一下什么是资源,从MSDN上的解释,资源定义有几个:
1 A piece of static data, such as a dialog box, that can be used by more than one application or in more than one place within an application. Alternatively, any part of a computer or network, such as a disk drive, printer, or memory, that can be used by a program or process.
2Binary data the resource compiler or developer adds to an application's executable file. Windows resources include icons, cursors, menus, dialog boxes, bitmaps, fonts, keyboard-accelerator tables, message-table entries, string-table entries, version data, and user-defined data.
定义1比定义而更广,却更不容易把握,不知道哪里能找到更准确的定义?希望听到大家的高见.