Closed jessemx109 closed 9 years ago
I think a singleton for the matcher is a great idea! However, I think maybe the whole object could be a singleton instead. Want to try to make it more comprehensive?
I added a new object to the file to handle to resource allocations
I was going to do that first but wasn't sure if it would cause problems in other calls having the same object be modified by multiple calls
Hmm... you're right. Adding the (ever changing) user inputs to the matchers would mess things up. I'd still like to not duplicate the methods used to generate the data. Maybe just have the omnimatch method in DBMatcher and everything else in DBMatchResources?
ya I wasn't sure what methods I could safely take out from the existing code
@jessemx109 want to take a stab at it? Or I can make the change if you prefer.
Again, thanks for coming up with the idea.
Ya I can take a look at it tonight
:+1:
Ok finally got time to remove those duplicate methods. I took out three methods that are only used once and left the two that are used in other places
I made a few small changes to the formatting to look more like the original zxcvbn, mostly just made everything lowercase :stuck_out_tongue_closed_eyes:
Thanks for your help! :tada: :trophy:
This adds the singleton object so memory doesn't grow to huge amounts. Look at what functions I moved into the new object so see if any are not needed in the standard DBMatcher Ojbect