---
title: AscendString构造函数和析构函数
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/udfrefc_23_00018.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/udfrefc_23_00018.html
indexId: a0847b113dc39ecaf9d7aa5ee1890f69640d842f9d62a8d00080fed4e9670db471
---
# AscendString构造函数和析构函数

#### 产品支持情况

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


#### 函数功能

AscendString构造函数和析构函数。


#### 函数原型

```
AscendString() = default
~AscendString() = default
AscendString(const char * const name)
AscendString(const char * const name, size_t length)
```


#### 参数说明

无


#### 返回值

AscendString构造函数返回AscendString类型的对象。


#### 异常处理

无。


#### 约束说明

无。
