During a recent discussion (see comments to this answer), R.. recommended to never create aliases for pointer-to-const types as you won\'t be able to deallocat
If the object is truly immutable, why give the user the pointer to it and risk an opportunity of corrupt object? Keep the object address in the table, return an opaque handle (an integer table index?) to the user and accept that handle in your library routines.