If you call reset() on a cursor and never call hasNext/getNext/etc it will essentially act as a "close" method. This is useful if you didn't finish fetching all the data from a cursor but don't want it to linger around till MongoDB decides to kill it.
(PECL mongo >=0.9.0)
MongoCursor::reset — Clears the cursor
public void MongoCursor::reset ( void )
This function has no parameters.
add a note User Contributed Notes MongoCursor::reset - [1 notes]
fastest963 at gmail dot com ¶
4 months ago