couchbaselabs / cbforest

C++ wrapper library around ForestDB, for use in Couchbase Lite.
17 stars 12 forks source link

Fixed crash in c4view_open, and other potential destructor-triggered crashes #107

Closed snej closed 8 years ago

snej commented 8 years ago

A bug in the RefCounted class's design was causing an assertion failure in its destructor, causing the process to abort because in C++11 it's a fatal error for a destructor to throw an exception. Fixed this and refactored two other classes so their destructors weren't doing work that could throw.

Fixes #105.

snej commented 8 years ago

@borrrden : The first commit is pretty straightforward. The second one is bigger than I'd normally send out for review, but I think it deserves review. Feel free to ask for a guided tour if you need one :)