The filament operation of resistive random-access memory (ReRAM) was studied via in-situ transmission electron microscopy (in-situ TEM), and the contribution of the conductive filament to the resistance switching was experimentally confirmed. In addition to the operation principles, the device degradation mechanism was studied through repeated write/erase operations. The importance of controlling Cu movement in the switching layer was confirmed for stable CBRAM (conductive bridge random access memory) operations. A device structure with double switching layers and device miniaturization was effective in restricting over accumulation of Cu in the switching layer and localizing the filament. This may improve the robustness of the device against performance degradation.