Efficient memory management is essential for signal and image processing systems, particularly in data-intensive applications where performance and resource constraints are critical. This paper presents a comparative study of two advanced memory optimization techniques: Memory Script Optimization (MSO), and Passive Active Flow Graph (PAFG) Optimization-within the context of dataflow-modeled applications. Both approaches aim to reduce memory usage and improve execution efficiency, but they do so with distinct strategies: Memory Scripts focus on in-place buffer management, while PAFG modifies actor interactions to minimize buffer requirements. Using a portion of a Convolutional neural network (CNN) application as a case study, we evaluate the efficiency of these techniques in terms of memory reduction and execution time. Our results demonstrate that MSO provides significant performance improvements, achieving up to 17% memory savings and 21% faster execution times, making it ideal for independent data operations. However, PAFG offers greater scalability and flexibility, particularly when dealing with complex data dependencies, and provides a simpler path to implementation. This work not only highlights the tradeoffs between memory efficiency and flexibility but also paves the way for applying these optimizations in near-memory computing architectures, where distance from memory to processing is employed as a parameter to improve efficiency.