Code Monkey home page Code Monkey logo

Comments (8)

iziz avatar iziz commented on August 29, 2024

Yep, You don't worry about that.
Before 0.8.x, "NBPhoneNumberUtil" has Phone number meta data.
But, now (0.8.x) it was moved to NBMetadataHelper. (For better memory/CPU usage)

Anyway, if you want to use "sharedInstance" for convenience, I can remove "deprecated mark".

Ref, https://github.com/iziz/libPhoneNumber-iOS/wiki/Update-Log

from libphonenumber-ios.

futuretap avatar futuretap commented on August 29, 2024

Thanks, so we'll switch to allocating the object freshly.

from libphonenumber-ios.

iziz avatar iziz commented on August 29, 2024

OK, But if you want to use "sharedInstance" for your convenience, just tell me.
I will remove deprecated mark.

from libphonenumber-ios.

futuretap avatar futuretap commented on August 29, 2024

No, not a big deal to change it. Actually it saves me from doing the locking on my side. I assume the lib can be called from arbitrary threads?

from libphonenumber-ios.

iziz avatar iziz commented on August 29, 2024

Yep, I assumed it. but can't guarantee yet :(
and welcome your idea for get rid out of inefficient logic.

from libphonenumber-ios.

juhovh avatar juhovh commented on August 29, 2024

Actually I think I would like to have the sharedInstance not deprecated.

I'm working with ReactiveCocoa and libPhoneNumber, and I do not want to refer to self from inside my blocks to make the code more functional. In order to do that I would need a singleton to NBPhoneNumberUtil and it feels silly to duplicate exactly what is already present in [NBPhoneNumberUtil sharedInstance].

I don't really care about the other singleton methods than the basic one, constantly allocating multiple NBPhoneNumberUtil instances on every keypress is just not a good idea IMHO, the singleton should perform better.

So the main problem is thread safety with the underlying libphonenumber?

from libphonenumber-ios.

iziz avatar iziz commented on August 29, 2024

I see, I will remove deprecation mark.
It is not important issue for singleton or creating instance. and "provide convenience" is more important :)

Anyway, I think it is not main problem "thread safety" in current libphonenumber-ios, but please create the issue if you find some thread problem.

thanks for your feedback.

from libphonenumber-ios.

juhovh avatar juhovh commented on August 29, 2024

Ok, thank you!

from libphonenumber-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.