code: def minimize_memory(self):
          
          if self.__samples is None:
              self.log(u"Not initialized, returning")
          else:
              self.log(u"Initialized, minimizing memory...")
              self.preallocate_memory(self.__samples_length)
              self.log(u"Initialized, minimizing memory... done")
docs: Reduce the allocated memory to the minimum
          required to store the current audio samples.
  
          This function is meant to be called
          when building a wave incrementally,
          after the last append operation.
  
          .. versionadded:: 1.5.0