1 package com.example.leakcanary
2 
3 import android.app.Service
4 import android.content.Intent
5 import android.os.IBinder
6 
7 class LeakingService : Service() {
8 
onCreatenull9   override fun onCreate() {
10     super.onCreate()
11     (application as ExampleApplication).leakedServices += this
12     stopSelf()
13   }
14 
onBindnull15   override fun onBind(intent: Intent?): IBinder? {
16     return null
17   }
18 }