Implemented with weak references if they are supported, otherwise by function calls that call the private versions.