[gcc-fix] Moved public dctor of ref-counted classes to protected. Now compiles on gcc483