Quote
Replaced WeakReference resource references with a new class, ResourceReference. This should fix most of #33.
* Each resource now holds its own reference in a public final field. In the constructor, it can either take a reference as a parameter (and optionally update it), or it can make a new reference.
* The access to the constructor and set method in ResourceReference is intentionally restricted to let only classes in the resources package handle them.
* Fixed handling of null references in several places.
* Removed Util.refsAreEqual since references should be unique and thus can be compared using ==.
* Made ResNode.res final, since this field shouldn't change. The reference will update itself.
* Added a new method, dispose, to Resource, which nulls its reference, signalling that the resource has been removed.
* Reorganized copy methods used by resources.
o Resources implement a single protected method for all copying, which is used by two methods in Resource:
+ copy(ResourceList<R> src), which should do the same as before.
+ clone(), which makes an exact deep copy of the resource, with the same reference. The reference can later be updated to point to this new clone.
o Note that the update parameter now has a different meaning: to update the given reference to point to the new resource (as in the constructor).
* Moved the UpdateSource system from Resource to ResourceReference. This means already established listener "connections" won't break when a resource gets replaced.