Skip to content

handler的问题 #59

Description

@SupingX

一直看你blog 求群号
GifFun
public static Handler getHandler() { return handler; }

Handler.kt
inline fun Handler.postDelayed(delayMillis: Long, crossinline action: () -> Unit) : Runnable { val runnable = Runnable { action() } postDelayed(runnable, delayMillis) return runnable }

这里的handler时候用是否会有内存泄露的风险?没有找到在什么地方remove掉还没有执行的runnable。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions