You passed the dereferenced object to the ExternalLibraryThingy#useItWisely
method. The external library does not care that you retrieved the object from a weak reference.
So whether the object has strong references in the external library depends entirely on the method that you called on it. Without knowing what the method does, it is impossible to know whether the object will still be referenced.
As for your second question, the library had the MySpecialObject
reference directly. From the point of view of the external library, it is not going to be randomly replaced with null
.