MlImage.Internal
Stay organized with collections
Save and categorize content based on your preferences.
Advanced API access for MlImage
.
These APIs are useful for other infrastructures, for example, acquiring extra reference
count for MlImage
. However,
an App developer should avoid using the following APIs.
APIs inside are treated as internal APIs which are subject to change.
Inherited Method Summary
From class java.lang.Object
Public Methods
public void
acquire
()
Acquires a reference on this MlImage
.
This will increase the reference count by 1.
This method is more useful for image consumer to acquire a reference so image
resource will not be closed accidentally. As image creator, normal developer doesn't
need to call this method.
The reference count is 1 when MlImage
is
created. Developer can call MlImage.close()
to indicate it doesn't need this MlImage
anymore.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eMlImage.Internal\u003c/code\u003e provides advanced API access for \u003ccode\u003eMlImage\u003c/code\u003e, primarily for infrastructure purposes and not for app developers.\u003c/p\u003e\n"],["\u003cp\u003eThese APIs are considered internal and subject to change without notice.\u003c/p\u003e\n"],["\u003cp\u003eThe key method, \u003ccode\u003eacquire()\u003c/code\u003e, increases the reference count of an \u003ccode\u003eMlImage\u003c/code\u003e, preventing accidental closure by consumers.\u003c/p\u003e\n"],["\u003cp\u003eApp developers generally should not directly use \u003ccode\u003eMlImage.Internal\u003c/code\u003e or its methods.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMlImage.close()\u003c/code\u003e should be used by developers when they are finished with an \u003ccode\u003eMlImage\u003c/code\u003e instance.\u003c/p\u003e\n"]]],["`MlImage.Internal` provides advanced, internal APIs for managing `MlImage` objects. It's advised that app developers avoid these APIs due to their potential to change. The key action is `acquire()`, which increments the reference count of an `MlImage`, preventing accidental closure of image resources. When an `MlImage` is created the reference count is 1. Developers should use `MlImage.close()` to release the image when finished. This `acquire` is useful for image consumers.\n"],null,["# MlImage.Internal\n\npublic static final class **MlImage.Internal** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nAdvanced API access for [MlImage](/android/reference/com/google/android/odml/image/MlImage).\n\nThese APIs are useful for other infrastructures, for example, acquiring extra reference\ncount for [MlImage](/android/reference/com/google/android/odml/image/MlImage). However,\nan App developer should avoid using the following APIs.\n\nAPIs inside are treated as internal APIs which are subject to change. \n\n### Public Method Summary\n\n|------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| void | [acquire](/android/reference/com/google/android/odml/image/MlImage.Internal#acquire())() Acquires a reference on this [MlImage](/android/reference/com/google/android/odml/image/MlImage). |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public void **acquire** ()\n\nAcquires a reference on this [MlImage](/android/reference/com/google/android/odml/image/MlImage).\nThis will increase the reference count by 1.\n\nThis method is more useful for image consumer to acquire a reference so image\nresource will not be closed accidentally. As image creator, normal developer doesn't\nneed to call this method.\n\nThe reference count is 1 when [MlImage](/android/reference/com/google/android/odml/image/MlImage) is\ncreated. Developer can call [MlImage.close()](/android/reference/com/google/android/odml/image/MlImage#close())\nto indicate it doesn't need this [MlImage](/android/reference/com/google/android/odml/image/MlImage)\nanymore. \n\n##### See Also\n\n- [MlImage.close()](/android/reference/com/google/android/odml/image/MlImage#close())"]]