When you place a DS Read or Write VI on your block diagram with no DS Open or DS Close VI, it is going to open and close that reference everytime that Read or Write VI is called. Therefore, it is basically the same as putting the DS Open and DS Close VI inside the loop, which will cause memory leaks. This should be avoided.