diff options
author | Aaron <aaron@10gen.com> | 2009-02-17 18:39:52 -0500 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-02-17 18:39:52 -0500 |
commit | 384c4881a12855c1c1e41e9f4a80b4c80649ded3 (patch) | |
tree | dede8a85e6786ac8d2e34ada2481f5d592ed80f9 /db | |
parent | fb656c60d2dbc8412d339a47446def0b4c2c6f25 (diff) | |
download | mongo-384c4881a12855c1c1e41e9f4a80b4c80649ded3.tar.gz |
Fix another memory leak
Diffstat (limited to 'db')
-rw-r--r-- | db/cursor.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/db/cursor.h b/db/cursor.h index 73859f466e3..29199fdd567 100644 --- a/db/cursor.h +++ b/db/cursor.h @@ -24,20 +24,21 @@ namespace mongo { 1 = kill current operation and reset this to 0 future: maybe use this as a "going away" thing on process termination with a higher flag value */ - extern int killCurrentOp;
-
+ extern int killCurrentOp; + inline void checkForInterrupt() { if( killCurrentOp ) { killCurrentOp = 0; uasserted("interrupted"); } - }
+ } /* Query cursors, base class. This is for our internal cursors. "ClientCursor" is a separate concept and is for the user's cursor. */ class Cursor { public: + virtual ~Cursor() {} virtual bool ok() = 0; bool eof() { return !ok(); |