adafruit / Adafruit_BMP280_Library

Arduino Library for BMP280 sensors
250 stars 187 forks source link

destructor bug fix to the pull request #68 / issue #67 #69

Closed adams13x13 closed 2 years ago

adams13x13 commented 2 years ago

In the destructor (Adafruit_BMP280::~Adafruit_BMP280), delete the objects only when they exist as mentioned in this comment.

In addition, I have placed the destructor after all constructors for the better code readability.

ladyada commented 2 years ago

thnx!

caternuson commented 2 years ago

double thanks. that was bugging me too. not sure how it worked in their testing. https://github.com/adafruit/Adafruit_BMP280_Library/pull/68#issuecomment-1011561823