---
title: 函数：destroy_config
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclpythondevg_01_0850.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclpythondevg_01_0850.html
indexId: d46307c57cf09c6eb379cee2ce78c2005182a4961f5eb44863b3c79fae3e681f71
---
# 函数：destroy_config

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |


#### 功能说明

销毁aclprofConfig类型的数据，只能销毁通过acl.prof.create_config接口创建的aclprofConfig类型。


#### 函数原型

- C函数原型
  1 aclError aclprofDestroyConfig(const aclprofConfig *profilerConfig)

- python函数
  1 ret = acl.prof.destroy_config(profiler_config)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| profiler\_config | int，待销毁的aclprofConfig类型的指针地址。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| ret | int，错误码。 返回0表示成功。 返回其它值表示失败。 |


#### 约束说明

- 与  acl.prof.create_config
接口配对使用，先调用acl.prof.create_config接口再调用aclprofDestroyConfig接口。
- 同一aclprofConfig数据重复调用acl.prof.destroy_config接口，会出现重复释放内存的报错。
