You could say

    apr.setown(new AprShared());
    apr->init();

avoiding the temporary variable.