It is use to keep the obj Alive in case of it is no longer use in the code ,it will be destroy by finlize by GC that's why we use gc.keepalive to keep safe its reference in memory.