> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PHEAP_TRACK_FREE_ROUTINE callback

> PHEAP_TRACK_FREE_ROUTINE callback

# Devolución de llamada PHEAP\_TRACK\_FREE\_ROUTINE

Representa una función de devolución de llamada de seguimiento para la desasignación del montón.

<a id="syntaxSection" />

## Sintaxis

```cpp theme={null}
void PHEAP_TRACK_FREE_ROUTINE(  
         HANDLE Heap,  
         DWORD flags,  
         PVOID addr  
)  
```

<a id="parametersSection" />

### Parámetros

*Heap*   \
Tipo: HANDLE

El identificador del montón desde el que se liberó el bloque de memoria.

*flags*   \
Tipo: DWORD

Las opciones de liberación del montón pasadas a [HeapFree](https://learn.microsoft.com/windows/desktop/api/heapapi/nf-heapapi-heapfree).

*addr*   \
Tipo: PVOID

La dirección del bloque de memoria que se liberó.

<a id="retvalSection" />

### Valor devuelto

Tipo: void

Ninguno.

<a id="remarksSection" />

## Comentarios

Esta función de devolución de llamada se puede implementar para realizar un seguimiento de cuándo se libera de un montón Win32 un bloque de memoria asignado previamente por la función [HeapAlloc](https://learn.microsoft.com/windows/desktop/api/heapapi/nf-heapapi-heapalloc) o [HeapRealloc](https://learn.microsoft.com/windows/desktop/api/heapapi/nf-heapapi-heaprealloc). Una vez implementada, debe registrar la función de devolución de llamada implementada llamando a [XMemSetWin32HeapTrackingHooks](/reference/system/xmem/functions/xmemsetwin32heaptrackinghooks). La función de devolución de llamada se invoca entonces después de que se llame a `HeapFree` para liberar un bloque de memoria asignado de un montón Win32. Para obtener más información sobre cómo implementar esta función de devolución de llamada, consulte la sección [Comentarios](/reference/system/xmem/functions/xmemsetwin32heaptrackinghooks#remarksSection) de `XMemSetWin32HeapTrackingHooks`.

<a id="requirementsSection" />

## Requisitos

**Encabezado:** xmem.h

**Biblioteca:** xmem.lib

**Plataformas compatibles:** consolas de la familia XBOX One y consolas XBOX Series

<a id="seealsoSection" />

## Consulte también

[Diagnóstico y seguimiento de memoria](/build/console-features/memory/system-memory-diagnostics)\
[XMemCreateWin32Heap](/reference/system/xmem/functions/xmemcreatewin32heap)\
[PHEAP\_TRACK\_ALLOC\_ROUTINE](/reference/system/xmem/functions/pheap_track_alloc_routine)\
[PHEAP\_TRACK\_REALLOC\_ROUTINE](/reference/system/xmem/functions/pheap_track_realloc_routine)\
[XMem](/reference/system/xmem/xmem_members)


## Related topics

- [PHEAP_TRACK_ALLOC_ROUTINE callback](/es/reference/system/xmem/functions/pheap_track_alloc_routine.md)
- [PHEAP_TRACK_REALLOC_ROUTINE callback](/es/reference/system/xmem/functions/pheap_track_realloc_routine.md)
- [XMemSetWin32HeapTrackingHooks](/es/reference/system/xmem/functions/xmemsetwin32heaptrackinghooks.md)
- [XMEMFREE_ROUTINE callback](/es/reference/system/xmem/functions/xmemfree_routine.md)
- [XMEMALLOC_ROUTINE callback](/es/reference/system/xmem/functions/xmemalloc_routine.md)
