| … | … | @@ -43,7 +43,6 @@ Aggregate::Aggregate(AtomSpace* as) |
| 43 | 43 | |
| 44 | 44 | Aggregate::~Aggregate() |
| 45 | 45 | { |
| 46 | if (_scratch) delete _scratch; | |
| 47 | 46 | } |
| 48 | 47 | |
| 49 | 48 | /// Yuck. Should not allow re-use... XXX FIXME!? |
| … | … | @@ -56,9 +55,8 @@ void Aggregate::clear(void) |
| 56 | 55 | _frame.clear(); |
| 57 | 56 | _odo.clear(); |
| 58 | 57 | |
| 59 | if (_scratch) delete _scratch; | |
| 60 | _scratch = new AtomSpace(_as); | |
| 61 | _cb->clear(_scratch); | |
| 58 | _scratch = createAtomSpace(_as); | |
| 59 | _cb->clear(_scratch.get()); | |
| 62 | 60 | } |
| 63 | 61 | |
| 64 | 62 | /// The nuclei are the nucleation points: points that must |
| … | … | @@ -38,7 +38,7 @@ class Aggregate |
| 38 | 38 | { |
| 39 | 39 | private: |
| 40 | 40 | AtomSpace* _as; |
| 41 | AtomSpace* _scratch; | |
| 41 | AtomSpacePtr _scratch; | |
| 42 | 42 | |
| 43 | 43 | /// Decision-maker |
| 44 | 44 | GenerateCallback* _cb; |