Are solar flares a result of a sudden conversion of magnetic energy stored prior to their onset?