CGRect

struct CGRect {

CGPoint origin;

CGSize size;

};

typedef struct CGRect CGRect;

CGRect is a C structure and defined as above.

It uses stack space and do not have * in definition:

CGRect frame;

This variable does not hold Objective-C object.

Objects have overhead of allocation and deallocation of heap memory, structs does not have this cost.

Leave a comment