Panda3D
 All Classes Functions Variables Enumerations
buffer.cxx
1 // Filename: buffer.cxx
2 // Created by: mike (09Jan97)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "buffer.h"
16 
17 ////////////////////////////////////////////////////////////////////
18 // Function: Buffer::Constructor
19 // Access: Public
20 // Description:
21 ////////////////////////////////////////////////////////////////////
22 Buffer::
23 Buffer(int size) {
24  _length = size;
25  _buffer = (char *)PANDA_MALLOC_ARRAY(_length);
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: Buffer::Destructor
30 // Access: Public
31 // Description:
32 ////////////////////////////////////////////////////////////////////
33 Buffer::
34 ~Buffer() {
35  PANDA_FREE_ARRAY(_buffer);
36 }
37