The function that creates the `BoardDetector` object passes the reference to an `IBoard` object. Perhaps a reference would fit better? But that probably doesn't avoid premature deallocation either, right?