Allow disabling automatic reference cleanup.