U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » BlockStream::_Get does not buffer data (current svn version)
Re: BlockStream::_Get does not buffer data (current svn version) [message #15443 is a reply to message #15442] Wed, 23 April 2008 22:39 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
hans wrote on Wed, 23 April 2008 16:23

In the function

dword BlockStream::_Get(void *data, dword size)

the call to SyncPage resets the read buffer, so the normal Get() functions of Stream are not benefit from buffering.




Thanks, correct.

Probably the correct fix is to call Term_():

	if(pg0 == pg1) {
		SyncPage();
		memcpy(data, buffer + pos0 - pos, size);
		ptr = buffer + pos1 - pos;
		_Term();
	}


(Calling Term_ should be OK at any time..).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: GetHWND() always returns NULL?
Next Topic: Convenient work with options/properties
Goto Forum:
  


Current Time: Mon Sep 07 18:53:00 GMT+2 2026

Total time taken to generate the page: 0.01016 seconds