#include "SkThread.h"
Go to the source code of this file.
Classes | |
class | SkRefCnt |
class | SkAutoUnref |
Defines | |
#define | SkRefCnt_SafeAssign(dst, src) |
#define SkRefCnt_SafeAssign | ( | dst, | |||
src | ) |
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.