diff --git a/examples/AndroidMath/AndroidMath.upp b/examples/AndroidMath/AndroidMath.upp index 7aebdfea6..4df70360b 100644 --- a/examples/AndroidMath/AndroidMath.upp +++ b/examples/AndroidMath/AndroidMath.upp @@ -11,9 +11,9 @@ file Vector.cpp, Math readonly separator, Vector.java, + AndroidMath.java, Runtime readonly separator, AndroidManifest.xml, - AndroidMath.java, AndroidMathActivity.java; mainconfig diff --git a/examples/AndroidMath/Vector.java b/examples/AndroidMath/Vector.java index bf97dbbcd..764a4d7d9 100644 --- a/examples/AndroidMath/Vector.java +++ b/examples/AndroidMath/Vector.java @@ -1,7 +1,7 @@ package org.upp.AndroidMath; /** - * Class which whole implementaiton is native. + * Class which whole funtional implementaiton is native. */ public class Vector { @@ -15,6 +15,9 @@ public class Vector copyConstruct(vec); } + /** + * We override finalize method due to possibilite of memory leaks. + */ @Override protected void finalize() throws Throwable { @@ -37,6 +40,8 @@ public class Vector private native void destroy(); static { + // In this place we are loading native libraries. + // Native library always has upp package name! System.loadLibrary("AndroidMath"); } }