BratinaRok / BlackboardReviewPrototype

0 stars 1 forks source link

minimize instatiations of expensive/common resources #3

Open RedJocker opened 1 year ago

RedJocker commented 1 year ago

Things like the okhttp client, moshi parser and alike can be instantiated only once and reused when needed. A common place to add this instances is in a class that extends Application. This class should be registered on the manifest file.

you can see an example here https://github.com/RedJocker/BlackboardReviewPrototype/blob/protOkhttp/Blackboard/stage1/src/main/java/org/hyperskill/blackboard/BlackboardApplication.kt