Closed MartinNowack closed 5 years ago
Thanks! There is no need to PROTECT() here because there are no R API calls between your protect and unprotect that could potentially trigger the gc. Can you remove that?
@jeroen Sure no problem. Removed PROTECT().
According to https://s3.amazonaws.com/mciuploads/mongo-c-driver/docs/latest/mongoc_client_get_default_database.html allocated memory needs to be cleaned-up with
mongoc_database_destroy
.Adds the proper call to avoid a memory leak.