@@ -221,20 +221,20 @@ namespace mongo {
221221 NamespaceDetails *d, int idxNo, const IndexDetails& id,
222222 const BSONObj &startKey, const BSONObj &endKey, bool endKeyInclusive, int direction)
223223 {
224- BtreeCursor *c = make ( d , idxNo , id );
224+ auto_ptr< BtreeCursor> c ( make ( d , idxNo , id ) );
225225 c->init (startKey,endKey,endKeyInclusive,direction);
226226 c->initWithoutIndependentFieldRanges ();
227227 dassert ( c->_dups .size () == 0 );
228- return c;
228+ return c. release () ;
229229 }
230230
231231 BtreeCursor* BtreeCursor::make (
232232 NamespaceDetails *d, int idxNo, const IndexDetails& id,
233233 const shared_ptr< FieldRangeVector > &bounds, int singleIntervalLimit, int direction )
234234 {
235- BtreeCursor *c = make ( d , idxNo , id );
235+ auto_ptr< BtreeCursor> c ( make ( d , idxNo , id ) );
236236 c->init (bounds,singleIntervalLimit,direction);
237- return c;
237+ return c. release () ;
238238 }
239239
240240 BtreeCursor::BtreeCursor ( NamespaceDetails* nsd , int theIndexNo, const IndexDetails& id )
0 commit comments