You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I got several outOfMemoryExcetion in HoldAndReleaseView. Here are the logs.
Fatal Exception: java.lang.OutOfMemoryError: pthread_create (1040KB stack) failed: Try again
at java.lang.Thread.nativeCreate(Thread.java)
at java.lang.Thread.start(Thread.java:1063)
at java.util.Timer$TimerImpl.(Timer.java:192)
at java.util.Timer.(Timer.java:365)
at java.util.Timer.(Timer.java:384)
at java.util.Timer.(Timer.java:391)
at peekandpop.model.HoldAndReleaseView.(SourceFile:25)
at .peekandpop.PeekAndPop.addHoldAndReleaseView(SourceFile:501).
The text was updated successfully, but these errors were encountered:
Basically don't create a new Timer in the constructor as it is then created for every time my adapter calls onBindViewHolder. And check if it is not null in cancelPendingTimer.
public PeekAndPopOnTouchListener(int position) { this.position = position; longHoldTimer = new Timer(); }
Hey, I got several outOfMemoryExcetion in HoldAndReleaseView. Here are the logs.
Fatal Exception: java.lang.OutOfMemoryError: pthread_create (1040KB stack) failed: Try again
at java.lang.Thread.nativeCreate(Thread.java)
at java.lang.Thread.start(Thread.java:1063)
at java.util.Timer$TimerImpl.(Timer.java:192)
at java.util.Timer.(Timer.java:365)
at java.util.Timer.(Timer.java:384)
at java.util.Timer.(Timer.java:391)
at peekandpop.model.HoldAndReleaseView.(SourceFile:25)
at .peekandpop.PeekAndPop.addHoldAndReleaseView(SourceFile:501).
The text was updated successfully, but these errors were encountered: