diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-08-09 11:47:56 +0000 |
|---|---|---|
| committer | Javiertxo <jtx@jtx.marker.es> | 2013-08-09 11:47:56 +0000 |
| commit | 4e358f420a7a1512c722d9eccd864416bc4c075b (patch) | |
| tree | 223e826158e09ab2c864abf0214fe1e6a714ab61 /src/trace | |
| parent | Update to trunk (diff) | |
| parent | Remove missing files from POTFILES.in (diff) | |
| download | inkscape-4e358f420a7a1512c722d9eccd864416bc4c075b.tar.gz inkscape-4e358f420a7a1512c722d9eccd864416bc4c075b.zip | |
update to trunk
(bzr r11950.1.127)
Diffstat (limited to 'src/trace')
| -rw-r--r-- | src/trace/pool.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/trace/pool.h b/src/trace/pool.h index d072a460b..88fd82bcd 100644 --- a/src/trace/pool.h +++ b/src/trace/pool.h @@ -59,17 +59,21 @@ class pool { public: pool() - { + { cblock = 0; size = sizeof(T) > sizeof(void *) ? sizeof(T) : sizeof(void *); next = NULL; - } + for (int k = 0; k < 64; k++) { + block[k] = NULL; + } + } ~pool() - { - for (int k = 0; k < cblock; k++) - free(block[k]); - } + { + for (int k = 0; k < cblock; k++) { + free(block[k]); + } + } T *draw() { @@ -89,7 +93,7 @@ class pool { int size; int cblock; - void *block[64]; //enough to store unlimited number of objects + void *block[64]; //enough to store unlimited number of objects, if 64 is changed: see constructor too void *next; void addblock() |
