use release policy to deallocate ptr when RC construction failed
Merge pull request #453 from Kontinuation/develop

Fix issue #287 again by using release policy