# DestroySessionVariableAsync Method

## Overloads

| [DestroySessionVariableAsync(String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableAsync.htm#Qlik_Engine_App_DestroySessionVariableAsync_System_String_) |  | Removes a transient variable. |
| --- | --- | --- |
| [DestroySessionVariableAsync(AsyncHandle, String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableAsync.htm#Qlik_Engine_App_DestroySessionVariableAsync_Qlik_Engine_AsyncHandle_System_String_) |  | Removes a transient variable. |
| [DestroySessionVariableAsync<T>(AsyncHandle, Func<Response, T>, String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableAsync.htm#Qlik_Engine_App_DestroySessionVariableAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_) |  | Removes a transient variable. |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableAsync.htm)

## DestroySessionVariableAsync(String)

Removes a transient variable.

### Declaration

```

          public Task<bool> DestroySessionVariableAsync([QixName("qId")] string id)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | id | Identifier of the variable. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;System.Boolean&gt; |  |

### Implements

[IApp.DestroySessionVariableAsync(String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.DestroySessionVariableAsync.htm#Qlik_Engine_IApp_DestroySessionVariableAsync_System_String_)

### Remarks

The operation is successful if **qSuccess** is set to true.

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableAsync.htm)

## DestroySessionVariableAsync(AsyncHandle, String)

Removes a transient variable.

### Declaration

```

          public Task<bool> DestroySessionVariableAsync(AsyncHandle asyncHandle, [QixName("qId")] string id)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.String | id | Identifier of the variable. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;System.Boolean&gt; |  |

### Implements

[IApp.DestroySessionVariableAsync(AsyncHandle, String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.DestroySessionVariableAsync.htm#Qlik_Engine_IApp_DestroySessionVariableAsync_Qlik_Engine_AsyncHandle_System_String_)

### Remarks

The operation is successful if **qSuccess** is set to true.

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableAsync.htm)

## DestroySessionVariableAsync&lt;T&gt;(AsyncHandle, Func&lt;Response, T&gt;, String)

Removes a transient variable.

### Declaration

```
public Task<T> DestroySessionVariableAsync<T>(AsyncHandle asyncHandle, Func<Response, T> onResult, [QixName("qId")] string id)
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.Func&lt;[Response](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Communication.IO.Response.htm), T&gt; | onResult | Continuation function |
| System.String | id | Identifier of the variable. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;T&gt; |  |

### Type Parameters

| Name | Description |
| --- | --- |
| T |  |

### Implements

[IApp.DestroySessionVariableAsync<T>(AsyncHandle, Func<Response, T>, String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.DestroySessionVariableAsync.htm#Qlik_Engine_IApp_DestroySessionVariableAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_)

### Remarks

The operation is successful if **qSuccess** is set to true.