not sure what you mean exactly.....if you want to return the same reference only when the data is EXACTLY the same (data passed to the contructor), then I'd say you could use some simple and fast hashing (CRC32 for example) - calculate the hash value for every created record and store it (inside the record itself or in a seperate array) and when you want to add a new record, calculate the hash for the new one and compare the hash with the already stored hashes...if a hash matches, you must perform a deep compare (field=field) because it may be possible 2 records can hash to the same value even when they have different data....to further reduce the the lookup time (you have to compare each hash), you could sort the array of records based on their hash value so you'd just do binary search to look for a hash value - if found, perform deep compare of records until you find the matching record or until you run out of hashes of the same value....if not found, you can be sure the record does not exist and you can add it to the list....