| 41 | } |
| 42 | |
| 43 | BackgroundGrid::~BackgroundGrid() |
| 44 | { |
| 45 | // for each grid |
| 46 | reset(); |
| 47 | while (isEnd() == false) { |
| 48 | |
| 49 | // remove data |
| 50 | if (iter->second != 0) { |
| 51 | delete iter->second; |
| 52 | iter->second = 0; |
| 53 | } |
| 54 | |
| 55 | next(); |
| 56 | } |
| 57 | |
| 58 | data.clear(); |
| 59 | iter = data.end(); |
| 60 | } |
| 61 | |
| 62 | void |
| 63 | BackgroundGrid::reset(const GridIndex& index) |