@@ -234,6 +234,10 @@ public struct MongoDatabase {
234234 * - options: Optional `ListCollectionsOptions` to use when executing this command
235235 * - session: Optional `ClientSession` to use when executing this command
236236 *
237+ * - Warning:
238+ * If the returned cursor is alive when it goes out of scope, it will leak resources. To ensure the cursor
239+ * is dead before it leaves scope, invoke `MongoCursor.kill(...)` on it.
240+ *
237241 * - Returns:
238242 * An `EventLoopFuture<MongoCursor<CollectionSpecification>>` containing a cursor over the collections.
239243 *
@@ -352,6 +356,10 @@ public struct MongoDatabase {
352356 * - options: An optional `ChangeStreamOptions` to use when constructing the change stream.
353357 * - session: An optional `ClientSession` to use with this change stream.
354358 *
359+ * - Warning:
360+ * If the returned change stream is alive when it goes out of scope, it will leak resources. To ensure the
361+ * change stream is dead before it leaves scope, invoke `ChangeStream.kill(...)` on it.
362+ *
355363 * - Returns:
356364 * An `EventLoopFuture<ChangeStream>`. On success, contains a `ChangeStream` watching all collections in this
357365 * database.
@@ -389,6 +397,10 @@ public struct MongoDatabase {
389397 * - withFullDocumentType: The type that the `fullDocument` field of the emitted `ChangeStreamEvent`s will be
390398 * decoded to.
391399 *
400+ * - Warning:
401+ * If the returned change stream is alive when it goes out of scope, it will leak resources. To ensure the
402+ * change stream is dead before it leaves scope, invoke `ChangeStream.kill(...)` on it.
403+ *
392404 * - Returns:
393405 * An `EventLoopFuture<ChangeStream>`. On success, contains a `ChangeStream` watching all collections in this
394406 * database.
@@ -431,6 +443,10 @@ public struct MongoDatabase {
431443 * - withEventType: The type that the entire change stream response will be decoded to and that will be returned
432444 * when iterating through the change stream.
433445 *
446+ * - Warning:
447+ * If the returned change stream is alive when it goes out of scope, it will leak resources. To ensure the
448+ * change stream is dead before it leaves scope, invoke `ChangeStream.kill(...)` on it.
449+ *
434450 * - Returns:
435451 * An `EventLoopFuture<ChangeStream>`. On success, contains a `ChangeStream` watching all collections in this
436452 * database.
0 commit comments