If you have the exact object it is easy with `sys.getrefcount`. For the buffer it probably does not work directly (it creates a new buffer object). In practice however the buffer always keeps a reference to its parent for memory managment, so you can check that the parent buffer refcount does not change. You may be able to get more info from the garbage collector, but not sure about that.