---
title: aclrtAllocatorUnregister
description: "取消注册用户提供的Allocator以及Allocator对应的回调函数，用于取消使用用户提供的Allocator。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/aadgc/aclcppdevg_03_0115.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/aadgc/aclcppdevg_03_0115.html
indexId: 902ecb31ef5d7c5467bffa100f6416766da029f7c6a5419ddaf20cd2f7747e2e105
---
# aclrtAllocatorUnregister

#### 函数功能

取消注册用户提供的Allocator以及Allocator对应的回调函数，用于取消使用用户提供的Allocator。

Atlas 200/500 A2推理产品，不支持该接口。


#### 约束说明

- 用户销毁Allocator前，调用本接口取消注册。
- 待取消注册的Stream不存在，或多次调用本接口取消注册，本接口内部不做任何操作，返回成功。


#### 函数原型

aclError aclrtAllocatorUnregister(aclrtStream stream)


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| stream | 输入 | 该Allocator需要注册的stream。 |


#### 返回值说明

返回0表示成功，返回其它值表示失败。
