and there are needs to delete key before do return in for loop !
For subj:
FL_Shared_Image::add() does qsort, and by that
original_ images stayed in end of array images_.
When happens calling bsearch (in find() method)
then it will does search only for first occurence.
In result: I have two images with same name, but
with different sizes. When I'm trying to get
third image with that name but with other sizes,
I got nothing.
Finds a shared image from its name and size specifications.
If the image name
exists with the exact width W
and height H
, then it is returned.
If W
== 0 and the image name
exists with another size, then the original image with that name
is returned.
To obtain a non-null result from the call to get() you either ask for an existing shared image with
the size of that image, or set W=0, and then you get the first created among those images with that name.
If I understand correctly what you would like to obtain, you could get it with
Manolo, please, read last messages this thread.