Hmmm, no, and no. First of all, using a bigger data type than you need is not a memory leak. If you will, it's a memory waste, but one you'll recover after the variable has gone out of scope. Memory leakage occurs when you leave an object in memory, and that object is never destroyed, so it keeps using that memory, potentially, forever.
Second of all, since we're all using 32 bit processors, and they can only handle information in 32-bit chunks, using Long is actually more efficient than using Byte since, if you use Byte, the processor has to waste time converting the Byte to a Long, and back. Of course, this difference tends to be absolutely minimal, but since we're discussing a 3 byte difference... ;) Just my 2 cents Daniel > -----Mensaje original----- > De: Richard [mailto:[EMAIL PROTECTED] > Enviado el: Saturday, November 27, 2004 23:21 > Para: [EMAIL PROTECTED] > Asunto: [vbhelp] Re: How to Create Control.. > > > > > Sorry for the late reply, but speaking of memory leaks, I can see one > in the code posted below...If you are using numbers you should use > the smallest range possible...If you are using only 1 to 5 then Long > is not the most efficient data type...There's a data type that only > allows whole #s <256...Byte you should use this type unless you think > your #s will go over 255. > > Check this code > > instead of > > >Dim xx As Long > > use > > Dim xx As Byte > > Hope this helps! > > Richard > > > > > > > > '// ======================================================= > Rules : http://ReliableAnswers.com/List/Rules.asp > Home : http://groups.yahoo.com/group/vbHelp/ > ======================================================= > Post : [EMAIL PROTECTED] > Join : [EMAIL PROTECTED] > Leave : [EMAIL PROTECTED] > '// ======================================================= > > Yahoo! Groups Links > > > > > > > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> $9.95 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/k7folB/TM --------------------------------------------------------------------~-> '// ======================================================= Rules : http://ReliableAnswers.com/List/Rules.asp Home : http://groups.yahoo.com/group/vbHelp/ ======================================================= Post : [EMAIL PROTECTED] Join : [EMAIL PROTECTED] Leave : [EMAIL PROTECTED] '// ======================================================= Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/vbhelp/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
