fix: remove delegate after scanning finishes

Remove the stringDetector delegate after scanning to avoir further
calls after the object is deallocated