Too much space between figure-tikzpicture and caption. Also, \centering doesn't seem to be working properly, as it places the figure far to the left.
It's as if the tikz drawing is larger than it actually shows, having white space both to the left and below.
The expected result is to maintain a normal center and without extra space that breaks with the aesthetics of the document, something like:
Is there something I'm missing to make this happen? Can I put a frame on the figure and/or the tikz picture to see the space they occupy?
The code I'm trying to implement is as follows:
\documentclass{article}
\usepackage{tikz}
\begin{document}
La variable de tipo puntero se utilizan para almacenar en ellas la dirección de memoria de otra variable. El puntero, como variable que es tiene asociado su dirección de memoria y su contenido será la dirección de memoria de otra variable (véase figura \ref{puntero}).
\begin{figure}[h]
\centering
\begin{tikzpicture}
\draw[-] (0,0) -- (7.5,0)
node at (1.5,0.5) {DIR MEM}
node at (4,0.5) {VAR}
node at (6,0.5) {VALOR};
\draw[-] (3,0) -- (3,-1.9)
node at (1.5,-0.5) {0xFFFFFFF0}
node at (4,-0.5) {\textit{num1}}
node at (6,-0.5) {5}
node at (1.5,-1) {0xFFFFFFF1}
node at (4,-1) {\textit{punt}}
node at (6.3,-1) {0xFFFFFFF0}
node at (1.5,-1.5) {0xFFFFFFF2};
\draw[-stealth,gray] (6.3,-1.3) to[out=300, in=180] (0.2,-0.5);
\end{tikzpicture}
\caption{Ejemplo de puntero \textit{punt} que referenciua a la dirección de memoria 0xFFFFFFF0 que es, a su vez, la variable entera \textit{num1} que almacena el valor 5.}
\label{puntero}
\end{figure}
Los punteros pueden apuntar a variables previamente declaradas o a variables dinámicas.La potencia de los punteros reside en poder crear (reservar memoria) y destruir (liberar memoria) una variable (dinámica) en tiempo de ejecución.
\end{document}



\useasboundingbox(TikZ manual v3.19a, p.172,184), but it's difficult to say without a MWE. See: https://tex.meta.stackexchange.com/questions/228/ive-just-been-asked-to-write-a-minimal-working-example-mwe-what-is-that – Juan Castaño Nov 11 '22 at 10:38overlayoption, the tikz picture won't influence the spacing. Please add a minimal working example which shows the code you use. – samcarter_is_at_topanswers.xyz Nov 11 '22 at 11:06\draw[-stealth,gray,overlay] (6.3,-1.3) to[out=300, in=180] (0.2,-0.5);– samcarter_is_at_topanswers.xyz Nov 12 '22 at 22:32