Back to index

lightning-sunbird  0.9+nobinonly
Defines
nsNSSCleaner.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NSSCleanupAutoPtrClass(nsstype, cleanfunc)

Define Documentation

#define NSSCleanupAutoPtrClass (   nsstype,
  cleanfunc 
)
Value:
class nsstype##Cleaner                             \
{                                                  \
private:                                           \
  nsstype##Cleaner(const nsstype##Cleaner&);       \
  nsstype##Cleaner();                              \
  void operator=(const nsstype##Cleaner&);         \
  nsstype *&object;                                \
public:                                            \
  nsstype##Cleaner(nsstype *&a_object)             \
    :object(a_object) {}                           \
  ~nsstype##Cleaner() {                            \
    if (object) {                                  \
      cleanfunc(object);                           \
      object = nsnull;                             \
    }                                              \
  }                                                \
};

Definition at line 87 of file nsNSSCleaner.h.