---
title: Release接口
description: "释放输入张量对象内存。"
url: https://www.hiascend.com/document/detail/zh/mindie/latest/mindiellm/llmdev/mindie_llm0115.html
sourcePath: /source/zh/mindie/310/mindiellm/llmdev/mindie_llm0115.html
indexId: faad9ca13410efe8ef880b9f7c3d31195e3de61ecb11bd517b5cb7c3f8a9dead58
---
# Release接口

#### 接口功能

释放输入张量对象内存。


#### 接口格式

```
void Release()
```


#### 接口参数

无。


#### 使用样例

构造一个名为"INPUT_IDS"，数据类型为INT64，数据维度为{1，2}的Tensor对象，然后释放该对象的数据内存空间。

```
std::string name = "INPUT_IDS";
mindie_llm::InferDataType dataType = mindie_llm::InferDataType::TYPE_INT64;
std::vector<int64_t> dataShape = {1, 2};
auto inputsTensor = std::make_shared<mindie_llm::InferTensor>(name, dataType, dataShape);
inputsTensor->Release();
```


#### 返回值

无。
