• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2021 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 package org.skia.androidkit;
9 
10 public class Path {
11     private long mNativeInstance;
12 
Path(long native_instance)13     Path(long native_instance) {
14         mNativeInstance = native_instance;
15     }
16 
17     /**
18      * Releases any resources associated with this Shader.
19      */
release()20     public void release() {
21         nRelease(mNativeInstance);
22         mNativeInstance = 0;
23     }
24 
25     @Override
finalize()26     protected void finalize() throws Throwable {
27         release();
28     }
29 
30     // package private
getNativeInstance()31     long getNativeInstance() { return mNativeInstance; }
32 
nRelease(long nativeInstance)33     private static native void nRelease(long nativeInstance);
34 }
35