今天下午对面的老大调试遇到这个问题,大家1起讨论好久才解决这个问题
crt源代码都是可以看到的,为了了解清楚缘由,10分有必要查看源码,源码1般在你的VS安装路径下VCcrtsrc下。
点击重试,定位到崩溃源码地方dbgdel.c的第52行。
为了了解缘由,我的测试代码是这样写的:
int _tmain(int argc, _TCHAR* argv[])
{
{
char* p = "123456789";
delete p;
p = NULL;
}
_BLOCK_TYPE_IS_VALID宏用来检测这个内存块在当前堆上是不是有效,但是这里的指针是1个临时变量,临时变量是在栈上分配的,函数清算栈时会自动回收这些内存,程序员无需管理。
程序员new 和 malloc申请的内存是位于堆上面,程序不会自动清算,这就是区分所在。
因此,检查你所释放(delete 或 free)的那个指针,不是动态申请的就别弄巧成拙去释放了。
老大遇到的情况就有点稀里糊涂了,new了1段内存,然后调用delete[]释放,啥都没干也会崩溃。大家分析了下,代码本身是没有缘由的,这时候候他检查工程属性发现:大部份工程都是win32的,这个dll却是使用的mfc dll(说道MFC我想说下,这都甚么年头了,如果是刚入行的就不要学MFC了,没意义没前程)。工程属性改正后,重新编译就行了。
波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
波比源码 » VS调试_ASSERTE(_BLOCK_TYPE_IS_VALID(pHead->nBlockUse));崩溃原因及解决方法
波比源码 » VS调试_ASSERTE(_BLOCK_TYPE_IS_VALID(pHead->nBlockUse));崩溃原因及解决方法
buy levofloxacin without prescription order levaquin 250mg for sale
dutasteride online buy celecoxib 200mg ca zofran canada
ampicillin 250mg pills order bactrim 960mg for sale erythromycin tablet
order fildena 100mg online sildenafil 100mg for sale robaxin 500mg oral
buy sildenafil generic sildalis buy online estrace for sale online
cost tadalafil 20mg tadacip 10mg cost generic voltaren 50mg
cialis 10mg cost ordering drugs from canada us pharmacy viagra
acheter 40mg cialis acheter 40mg cialis acheter 50mg du viagra
accutane 40mg cheap buy amoxil buy ivermectin usa
purchase doxycycline generic order doxycycline 200mg generic generic lasix 100mg
fosamax 70mg price order fosamax 35mg online cheap pepcid price
cost benicar 10mg order olmesartan 20mg diamox over the counter
imdur 40mg uk order micardis 20mg pill micardis 80mg drug
molnunat 200 mg brand order cefdinir 300 mg generic buy prevacid 15mg without prescription
revia price abilify ca purchase abilify for sale
avlosulfon cheap nifedipine oral order aceon 4mg online cheap
buy isotretinoin 10mg sale accutane 10mg uk brand deltasone 10mg
price cialis tadalafil 40mg usa sildenafil 50mg over the counter
buy furosemide cheap plaquenil 400mg order plaquenil generic
buy itraconazole 100mg pill order tinidazole 300mg pills tinidazole 500mg cost
purchase zyprexa generic buy valsartan 80mg for sale valsartan buy online
norvasc 10mg uk generic tadalafil 20mg cialis in usa
viagra overnight shipping usa purchase sildenafil online cheap buy lisinopril 2.5mg online
omeprazole cost essay edit online poker sites
generic zyvox 600mg world series of poker online doubleu casino online casino
vardenafil 10mg usa buy pregabalin online methylprednisolone buy online
help me write my research paper thesis writing services buy viagra 50mg pills
buy generic cialis 5mg order cialis 20mg pill order sildenafil 100mg generic
order aristocort for sale triamcinolone 10mg over the counter purchase desloratadine online cheap
zyloprim 300mg canada buy crestor 10mg pills ezetimibe for sale online
purchase colchicine pills purchase colchicine generic texas poker online
black jack card game free play poker online free no sign up online casino usa real money
order flomax 0.4mg pills spironolactone 100mg without prescription purchase spironolactone online
cialis sales cipro generic ciprofloxacin tablet
buy zocor online cheap order proscar sale proscar 5mg ca
buy generic tadalafil 20mg cheap tadalafil 40mg sildenafil online buy
buy a term paper online help with essays ivermectin 6 mg for people
poker online real money guaranteed cialis overnight delivery usa buy cialis canada
azithromycin for sale gabapentin buy online buy neurontin 600mg pill
furosemide cost buy lasix 100mg pill hydroxychloroquine sale
clobetasol price buspar 5mg pill order amiodarone 200mg pills
cheap generic amoxil stromectol 6mg drug can you buy stromectol over the counter
cost fosamax 35mg order motrin generic motrin 400mg
buy pamelor 25 mg sale nortriptyline without prescription paxil cost
purchase tadalafil pill Cialis store sildenafil online order
tadalafil 5mg price Cialis on line best ed pills non prescription
order prednisone 5mg amoxicillin canada amoxil 1000mg ca
cheap zofran 4mg zofran usa bactrim brand
accutane 40mg pill order amoxil 250mg pill order azithromycin 250mg
purchase albuterol sale generic ventolin 4mg augmentin 625mg ca
avodart pills order orlistat online cheap order xenical for sale
oxybutynin 2.5mg usa buy oxcarbazepine 600mg sale buy trileptal 300mg online
order cefdinir 300 mg for sale pantoprazole 40mg canada order protonix online
avlosulfon us purchase dapsone without prescription how to get atenolol without a prescription
purchase alfuzosin sale diltiazem 180mg without prescription diltiazem 180mg brand
purchase medex warfarin 5mg ca buy zyloprim online cheap
I really love to read such an excellent article. Helpful article. Hello Administ . mf ajans