Temperature memory effect in TiNi-based shape memory alloys