include/core/SkRefCnt.h File Reference

#include "SkThread.h"
Include dependency graph for SkRefCnt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SkRefCnt
class  SkAutoUnref

Defines

#define SkRefCnt_SafeAssign(dst, src)

Define Documentation

#define SkRefCnt_SafeAssign ( dst,
src   ) 
Value:
do {                                \
        if (src) src->ref();            \
        if (dst) dst->unref();          \
        dst = src;                      \
    } while (0)

Helper macro to safely assign one SkRefCnt[TS]* to another, checking for null in on each side of the assignment, and ensuring that ref() is called before unref(), in case the two pointers point to the same object.

Definition at line 126 of file SkRefCnt.h.


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