SkAutoUnref Class Reference

#include <SkRefCnt.h>

Collaboration diagram for SkAutoUnref:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SkAutoUnref (SkRefCnt *obj)
 ~SkAutoUnref ()
SkRefCntget () const
bool ref ()
bool unref ()
SkRefCntdetach ()

Detailed Description

SkAutoUnref is a stack-helper class that will automatically call unref() on the object it points to when the SkAutoUnref object goes out of scope. If obj is null, do nothing.

Definition at line 94 of file SkRefCnt.h.


Constructor & Destructor Documentation

SkAutoUnref::SkAutoUnref ( SkRefCnt obj  )  [inline]

Definition at line 96 of file SkRefCnt.h.

SkAutoUnref::~SkAutoUnref (  ) 

Member Function Documentation

SkRefCnt* SkAutoUnref::detach (  ) 

If the hosted object is null, do nothing and return NULL, else call unref() on it, set its reference to null, and return the object

SkRefCnt* SkAutoUnref::get (  )  const [inline]

Definition at line 99 of file SkRefCnt.h.

bool SkAutoUnref::ref (  ) 

If the hosted object is null, do nothing and return false, else call ref() on it and return true

bool SkAutoUnref::unref (  ) 

If the hosted object is null, do nothing and return false, else call unref() on it, set its reference to null, and return true


The documentation for this class was generated from the following file:

Generated on Tue Oct 20 11:03:41 2009 for Skia by  doxygen 1.6.1