  In this paper, we study the correlation between isotropic energy and duration
of gamma-ray bursts (GRBs) for the first time. The correlation is found to be
$T_d \propto {E_{iso}}^{0.34\pm 0.03}$ from the {\em Swift} GRB sample. After
comparing with solar flares from {\em RHESSI} and stellar superflares from {\em
Kepler} satellite, we find that the correlation of GRBs shows similar exponent
with those of solar flares and stellar superflares. Inspired by the physical
mechanism of solar flares and stellar superflares which is magnetic
reconnection, we interpret the correlation using magnetic reconnection theory.
This similarity hints that magnetic reconnection may dominate energy releasing
process of GRBs.
