question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can change to another End point?

See original GitHub issue

i used ‘com.facebook.fresco:fresco:0.12.0’ ‘com.facebook.fresco:imagepipeline-okhttp3:0.12.0’

i have 4 different Server. get image from the server must need own http session. so I initalize Fresco when create Activity. every time.

@Override
    protected void onCreate(Bundle savedInstanceState) {
    ...
    if (mRequest.getSource().equals(A.BASE_URL)) {
        Fresco.initialize(mFolderDetailView.getContext(), ImagePipelineConfigFactory.getNewOkHttpImagePipelineConfig(mFolderDetailView.getContext(), A_RestfulAdapter.getClient()));
    } else if (mRequest.getSource().equals(B.BASE_URL)) {
        Fresco.initialize(mFolderDetailView.getContext(), ImagePipelineConfigFactory.getNewOkHttpImagePipelineConfig(mFolderDetailView.getContext(), B_RestfulAdapter.getClient()));
    } else if (mRequest.getSource().equals(C.BASE_URL)) {
        Fresco.initialize(mFolderDetailView.getContext(), ImagePipelineConfigFactory.getNewOkHttpImagePipelineConfig(mFolderDetailView.getContext(), C_RestfulAdapter.getClient()));
    } else {
        Fresco.initialize(mFolderDetailView.getContext(), ImagePipelineConfigFactory.getNewOkHttpImagePipelineConfig(mFolderDetailView.getContext(), A_RestfulAdapter.getClient()));
    }

work is fine. but have NativeMemory leak. I afraid of OOM.

Log is right this

NativeMemoryChunk: finalize: Chunk 267867b0 still active. Underlying address = 2fcca010

is ‘Fresco.initalize’ only way change to another End point? or How can change to another End point?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
oprisnikcommented, Aug 4, 2016

Yeah, writing your own BaseNetworkFetcher<OkHttpNetworkFetcher.OkHttpNetworkFetchState> should be the best solution here since re-initializing Fresco all the time would clear all the memory caches etc. - which is not really what you want.

0reactions
leeyc09commented, Aug 5, 2016

@oprisnik got it . Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

When and How Can Endpoints Be Changed after Initiation of ...
Given that changes to endpoints are so frequent, it's important to evaluate when such changes are appropriate and how they should be reported....
Read more >
Change a public or private API endpoint type in API Gateway
Changing an API endpoint type requires you to update the API's configuration. You can change an existing API type using the API Gateway ......
Read more >
How to change the end point - SmartBear Community
Hi, The end point of my web services have changed. How can I change the end point? There doesn't seem to be an...
Read more >
How to change endpoints for different stages in javascript ...
Each of the file uses different endpoints to make ajax calls. How can read the stage config based on some variable [if not...
Read more >
Step 3: Change your target endpoint | Apigee Edge
This takes you to the API Proxy Editor. The Proxy Editor lets you see the structure of your API proxy and configure its...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found