Fixed Error in WeakReferences Data

Fixed Error in WeakReferences Data and added unit tests. Unit test
require DUnitX to be located somewhere on the library path.