鴻蒙OS OutOfMemoryError

2022-06-06 15:14 更新

OutOfMemoryError

java.lang.Object

|---java.lang.Throwable

|---|---java.lang.Error

|---|---|---java.lang.VirtualMachineError

|---|---|---|---java.lang.OutOfMemoryError

  1. public class OutOfMemoryError
  2. extends VirtualMachineError

當 Java 虛擬機因為內存不足而無法分配對象時拋出,并且垃圾收集器無法提供更多內存。 OutOfMemoryError 對象可以由虛擬機構造,就像 Throwable#Throwable(String, Throwable, boolean, boolean)。

構造函數摘要

構造函數 描述
OutOfMemoryError() 構造一個沒有詳細消息的 OutOfMemoryError。
OutOfMemoryError(String s) 構造帶有指定詳細消息的 OutOfMemoryError。

方法總結

從類 java.lang.Object 繼承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
從類 java.lang.Throwable 繼承的方法
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

構造函數詳細信息

OutOfMemoryError

public OutOfMemoryError()

構造一個沒有詳細消息的 OutOfMemoryError。

OutOfMemoryError

public OutOfMemoryError(String s)

構造帶有指定詳細消息的 OutOfMemoryError。

參數:

參數名稱 參數描述
s 詳細信息。
以上內容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號