1 
2 
3 /*
4 A* -------------------------------------------------------------------
5 B* This file contains source code for the PyMOL computer program
6 C* Copyright (c) Schrodinger, LLC.
7 D* -------------------------------------------------------------------
8 E* It is unlawful to modify or remove this copyright notice.
9 F* -------------------------------------------------------------------
10 G* Please see the accompanying LICENSE file for further information.
11 H* -------------------------------------------------------------------
12 I* Additional authors of this source file include:
13 -*
14 -*
15 -*
16 Z* -------------------------------------------------------------------
17 */
18 #ifndef _H_OOMac
19 #define _H_OOMac
20 
21 #include"Err.h"
22 #include"MemoryDebug.h"
23 
24 #define OOAlloc(G,type) \
25 auto* I = new type; \
26 ErrChkPtr(G,I);
27 
28 #define OOCalloc(G,type) \
29 auto* I = new type(); \
30 ErrChkPtr(G,I);
31 
32 #define OOFreeP(ptr) \
33 {if(ptr) {delete(ptr);ptr=NULL;}}
34 
35 #endif
36